fftools/ffmpeg: make sure FrameData is writable when we modify it

Also, add a function that returns const FrameData* for cases that only
read from it.
This commit is contained in:
Anton Khirnov
2023-11-13 09:35:44 +01:00
parent 1d536e0283
commit 99d2fa38ad
3 changed files with 21 additions and 6 deletions

View File

@@ -1859,9 +1859,9 @@ static int choose_out_timebase(OutputFilterPriv *ofp, AVFrame *frame)
FPSConvContext *fps = &ofp->fps;
AVRational tb = (AVRational){ 0, 0 };
AVRational fr;
FrameData *fd;
const FrameData *fd;
fd = frame_data(frame);
fd = frame_data_c(frame);
// apply -enc_time_base
if (ofp->enc_timebase.num == ENC_TIME_BASE_DEMUX &&