Unified · Split
| @@ -1916,8 +1916,13 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c · 1915 unmodified lines | ||
| 1916 | 1916 | AVFrameSideData *sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX); |
| 1917 | 1917 | if (sd) |
| 1918 | 1918 | displaymatrix = (int32_t *)sd->data; |
| 1919 | − if (!displaymatrix) | |
| 1920 | − displaymatrix = (int32_t *)av_stream_get_side_data(is->video_st, AV_PKT_DATA_DISPLAYMATRIX, NULL); | |
| 1919 | + if (!displaymatrix) { | |
| 1920 | + const AVPacketSideData *sd = av_packet_side_data_get(is->video_st->codecpar->coded_side_data, | |
| 1921 | + is->video_st->codecpar->nb_coded_side_data, | |
| 1922 | + AV_PKT_DATA_DISPLAYMATRIX); | |
| 1923 | + if (sd) | |
| 1924 | + displaymatrix = (int32_t *)sd->data; | |
| 1925 | + } | |
| 1921 | 1926 | theta = get_rotation(displaymatrix); |
| 1922 | 1927 | |
| 1923 | 1928 | if (fabs(theta - 90) < 1.0) { |