[FFmpeg-devel,v1,2/3] fftools/ffmpeg: replace the deprecated av_copy_packet_side_data

Submitted by lance.lmwang@gmail.com on Sept. 4, 2019, 3:27 p.m.

Details

Message ID 20190904152712.23850-2-lance.lmwang@gmail.com
State New
Headers show

Commit Message

lance.lmwang@gmail.com Sept. 4, 2019, 3:27 p.m.
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 fftools/ffmpeg.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 01f0410..e1a4b4a 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2004,6 +2004,7 @@  static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
         output_packet(of, &opkt, ost, 1);
         return;
     }
+    av_packet_copy_props(&opkt, pkt);
 
     if ((!ost->frame_number && !(pkt->flags & AV_PKT_FLAG_KEY)) &&
         !ost->copy_initial_nonkeyframes)
@@ -2061,8 +2062,6 @@  static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
 
     opkt.duration = av_rescale_q(pkt->duration, ist->st->time_base, ost->mux_timebase);
 
-    opkt.flags    = pkt->flags;
-
     if (pkt->buf) {
         opkt.buf = av_buffer_ref(pkt->buf);
         if (!opkt.buf)
@@ -2071,8 +2070,6 @@  static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
     opkt.data = pkt->data;
     opkt.size = pkt->size;
 
-    av_copy_packet_side_data(&opkt, pkt);
-
     output_packet(of, &opkt, ost, 0);
 }