Skip to content

Commit

Permalink
upipe-av: fix compilation with previous ffmpeg versions
Browse files Browse the repository at this point in the history
AVBufferSrcParameters.color_range requires FFmpeg 7.0.
  • Loading branch information
nto authored and cmassiot committed Jul 22, 2024
1 parent 9c13e59 commit 2c3af10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/upipe-av/upipe_avfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -875,8 +875,10 @@ static int upipe_avfilt_sub_create_filter(struct upipe *upipe)
p->format = video->pix_fmt;
p->width = video->width;
p->height = video->height;
#if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(9, 16, 100)
p->color_range = video->full_range ?
AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
#endif
if (video->sar.num) {
p->sample_aspect_ratio.num = video->sar.num;
p->sample_aspect_ratio.den = video->sar.den;
Expand Down

0 comments on commit 2c3af10

Please sign in to comment.