This commit enables propagating an AVStream's attached_pic from the
input to the corresponding output stream.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@googlemail.com>
---
 fftools/ffmpeg.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 0f157d67d8..4528c466c7 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3111,6 +3111,14 @@ static int init_output_stream_streamcopy(OutputStream 
*ost)
     // copy disposition
     ost->st->disposition = ist->st->disposition;
 
+    // propagate attached pic
+    if (ist->st->attached_pic.data) {
+        ret = av_packet_ref(&ost->st->attached_pic, &ist->st->attached_pic);
+        if (ret < 0)
+            return ret;
+        ost->st->attached_pic.stream_index = ost->index;
+    }
+
     if (ist->st->nb_side_data) {
         for (i = 0; i < ist->st->nb_side_data; i++) {
             const AVPacketSideData *sd_src = &ist->st->side_data[i];
-- 
2.19.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to