*: fix warnings
- Don't use deprecated function for packet dropping - Fix compiler warning about values, which do not need to be mutable
This commit is contained in:
parent
052d342baf
commit
7d980a693e
@ -264,7 +264,7 @@ impl Clone for Packet {
|
|||||||
impl Drop for Packet {
|
impl Drop for Packet {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
av_free_packet(&mut self.0);
|
av_packet_unref(&mut self.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ impl Subtitle {
|
|||||||
(mem::size_of::<*const AVSubtitleRect>() * self.0.num_rects as usize) as size_t)
|
(mem::size_of::<*const AVSubtitleRect>() * self.0.num_rects as usize) as size_t)
|
||||||
as *mut _;
|
as *mut _;
|
||||||
|
|
||||||
let mut rect = av_mallocz(mem::size_of::<AVSubtitleRect>() as size_t) as *mut AVSubtitleRect;
|
let rect = av_mallocz(mem::size_of::<AVSubtitleRect>() as size_t) as *mut AVSubtitleRect;
|
||||||
(*rect).type_ = kind.into();
|
(*rect).type_ = kind.into();
|
||||||
|
|
||||||
*self.0.rects.offset((self.0.num_rects - 1) as isize) = rect;
|
*self.0.rects.offset((self.0.num_rects - 1) as isize) = rect;
|
||||||
|
@ -134,7 +134,7 @@ impl<'a> Parser<'a> {
|
|||||||
pub fn input(mut self, name: &str, pad: usize) -> Result<Self, Error> {
|
pub fn input(mut self, name: &str, pad: usize) -> Result<Self, Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut context = try!(self.graph.get(name).ok_or(Error::InvalidData));
|
let mut context = try!(self.graph.get(name).ok_or(Error::InvalidData));
|
||||||
let mut input = avfilter_inout_alloc();
|
let input = avfilter_inout_alloc();
|
||||||
|
|
||||||
if input.is_null() {
|
if input.is_null() {
|
||||||
panic!("out of memory");
|
panic!("out of memory");
|
||||||
@ -161,7 +161,7 @@ impl<'a> Parser<'a> {
|
|||||||
pub fn output(mut self, name: &str, pad: usize) -> Result<Self, Error> {
|
pub fn output(mut self, name: &str, pad: usize) -> Result<Self, Error> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut context = try!(self.graph.get(name).ok_or(Error::InvalidData));
|
let mut context = try!(self.graph.get(name).ok_or(Error::InvalidData));
|
||||||
let mut output = avfilter_inout_alloc();
|
let output = avfilter_inout_alloc();
|
||||||
|
|
||||||
if output.is_null() {
|
if output.is_null() {
|
||||||
panic!("out of memory");
|
panic!("out of memory");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user