[FFmpeg-devel] [PATCH] avformat: Copy properties from internal context

Michael Niedermayer michael at niedermayer.cc
Mon May 30 14:25:25 CEST 2016


Fixes Ticket5467 "Lossless j2k information no longer shown"

Based on suggestion by Hendrik Leppkes
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavformat/dump.c  |    3 +++
 libavformat/utils.c |    3 +++
 2 files changed, 6 insertions(+)

diff --git a/libavformat/dump.c b/libavformat/dump.c
index 9eb6146..e016a37 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -453,6 +453,9 @@ static void dump_stream_format(AVFormatContext *ic, int i,
         return;
     }
 
+    // Fields which are missing from AVCodecParameters need to be taken from the AVCodecContext
+    avctx->properties = st->codec->properties;
+
     if (separator)
         av_opt_set(avctx, "dump_separator", separator, 0);
     avcodec_string(buf, sizeof(buf), avctx, is_output);
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 47f5ba0..8f0361a 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3807,6 +3807,9 @@ FF_DISABLE_DEPRECATION_WARNINGS
         }
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif
+        // Fields unavailable in AVCodecParameters
+        st->codec->properties = st->internal->avctx->properties;
+
 
         st->internal->avctx_inited = 0;
     }
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list