From fc1db23b8455f5c5d82bd0e9c88ca0e1821c021e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 12 May 2009 20:34:20 +0200 Subject: [PATCH] mpeg2dec: work around old mpeg2dec versions The repeat first field flag was introduced in 0.5.0 so conditionally disable its detection and just assume no rff is used. This fixes the compilation. Fixes #582375 --- ext/mpeg2dec/gstmpeg2dec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c index 6317c20afa..0c4f581d94 100644 --- a/ext/mpeg2dec/gstmpeg2dec.c +++ b/ext/mpeg2dec/gstmpeg2dec.c @@ -941,15 +941,22 @@ handle_slice (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info) if (picture->flags & PIC_FLAG_TOP_FIELD_FIRST) GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_TFF); +#if MPEG2_RELEASE >= MPEG2_VERSION(0,5,0) + /* repeat field introduced in 0.5.0 */ if (picture->flags & PIC_FLAG_REPEAT_FIRST_FIELD) GST_BUFFER_FLAG_SET (outbuf, GST_VIDEO_BUFFER_RFF); +#endif GST_DEBUG_OBJECT (mpeg2dec, "picture: %s %s %s %s %s fields:%d off:%" G_GINT64_FORMAT " ts:%" GST_TIME_FORMAT, (picture->flags & PIC_FLAG_PROGRESSIVE_FRAME ? "prog" : " "), (picture->flags & PIC_FLAG_TOP_FIELD_FIRST ? "tff" : " "), +#if MPEG2_RELEASE >= MPEG2_VERSION(0,5,0) (picture->flags & PIC_FLAG_REPEAT_FIRST_FIELD ? "rff" : " "), +#else + "unknown rff", +#endif (picture->flags & PIC_FLAG_SKIP ? "skip" : " "), (picture->flags & PIC_FLAG_COMPOSITE_DISPLAY ? "composite" : " "), picture->nb_fields, GST_BUFFER_OFFSET (outbuf),