[FFmpeg-devel] [PATCH 05/12] fftools/ffplay: stop using AVStream.side_data

James Almer jamrial at gmail.com
Mon Aug 28 15:34:57 EEST 2023


Signed-off-by: James Almer <jamrial at gmail.com>
---
 fftools/ffplay.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index 5212ad053e..299d7b16d9 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -1904,8 +1904,12 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
         AVFrameSideData *sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX);
         if (sd)
             displaymatrix = (int32_t *)sd->data;
-        if (!displaymatrix)
-            displaymatrix = (int32_t *)av_stream_get_side_data(is->video_st, AV_PKT_DATA_DISPLAYMATRIX, NULL);
+        if (!displaymatrix) {
+            AVPacketSideData *sd = av_packet_side_data_set_get(&is->video_st->codecpar->side_data,
+                                                                    AV_PKT_DATA_DISPLAYMATRIX);
+            if (sd)
+                displaymatrix = (int32_t *)sd->data;
+        }
         theta = get_rotation(displaymatrix);
 
         if (fabs(theta - 90) < 1.0) {
-- 
2.41.0



More information about the ffmpeg-devel mailing list