[FFmpeg-cvslog] avformat/matroskadec: also export non-HDR10+ ITU-T T.35 payloads as BlockAdditional side data

James Almer git at videolan.org
Tue Apr 11 00:53:27 EEST 2023


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Apr 10 18:45:21 2023 -0300| [c558fcf41e2027a1096d00b286954da2cc4ae73f] | committer: James Almer

avformat/matroskadec: also export non-HDR10+ ITU-T T.35 payloads as BlockAdditional side data

Partially reverts a change from 88de01d878167cbff9af32c0b7366e0aae3db2bd, and
2133cadfcf9a613cf2c0060f9896bba49dabfba4.

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c558fcf41e2027a1096d00b286954da2cc4ae73f
---

 libavformat/matroskadec.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 6cccbcbe03..49950956b6 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3719,19 +3719,21 @@ static int matroska_parse_block_additional(MatroskaDemuxContext *matroska,
             av_free(hdrplus);
             return res;
         }
-        break;
+
+        return 0;
     }
     default:
-        side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
-                                            size + (size_t)8);
-        if (!side_data)
-            return AVERROR(ENOMEM);
-
-        AV_WB64(side_data, id);
-        memcpy(side_data + 8, data, size);
         break;
     }
 
+    side_data = av_packet_new_side_data(pkt, AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
+                                        size + (size_t)8);
+    if (!side_data)
+        return AVERROR(ENOMEM);
+
+    AV_WB64(side_data, id);
+    memcpy(side_data + 8, data, size);
+
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list