File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,14 @@ impl Decoder {
99
99
( * pkt) . buf = buf;
100
100
( * pkt) . data = data_ptr. cast ( ) ;
101
101
( * pkt) . pts = packet. pts ( ) ;
102
-
103
- pkt
104
102
// This should be the size of the data without the padding
105
103
( * pkt) . size = ( len as i32 ) - sys:: AV_INPUT_BUFFER_PADDING_SIZE as i32 ;
104
+
105
+ pkt
106
106
} ;
107
107
self . pts_map . set ( packet. pts ( ) , packet. rotation ( ) ) ;
108
-
109
108
let ret = unsafe { sys:: avcodec_send_packet ( self . ctx , pkt) } ;
109
+ // Regardless of errors we are done with this packet, parts of the packet might have been
110
110
// retained in the decoder.
111
111
unsafe {
112
112
sys:: av_packet_free ( & mut pkt) ;
@@ -295,7 +295,7 @@ impl Default for DecodedFrame {
295
295
296
296
impl Drop for DecodedFrame {
297
297
fn drop ( & mut self ) {
298
- if ! self . 0 . is_null ( ) {
298
+ if self . 0 . is_null ( ) {
299
299
return ;
300
300
}
301
301
@@ -308,7 +308,7 @@ impl Drop for DecodedFrame {
308
308
impl Default for PtsMap {
309
309
fn default ( ) -> Self {
310
310
Self {
311
- if self . 0 . is_null ( ) {
311
+ map : [ ( - 1 , 0 ) ; 16 ] ,
312
312
cur : 0 ,
313
313
}
314
314
}
You can’t perform that action at this time.
0 commit comments