From 7292973429dadbd9773ac623c7128fe065056858 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 12 Mar 2007 23:29:07 +0000 Subject: [PATCH] ext/theora/theoradec.c: Since the plugin doesn't support anything other than 4:2:0 right now, post an error and fail ... Original commit message from CVS: * ext/theora/theoradec.c: (theora_handle_type_packet): Since the plugin doesn't support anything other than 4:2:0 right now, post an error and fail if we get something else. Won't matter until libtheora supports the other pixel formats, but hopefully that'll be soon... --- ChangeLog | 8 ++++++++ ext/theora/theoradec.c | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 17520ecb2c..b57a88d912 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-03-13 Michael Smith + + * ext/theora/theoradec.c: (theora_handle_type_packet): + Since the plugin doesn't support anything other than 4:2:0 right + now, post an error and fail if we get something else. Won't matter + until libtheora supports the other pixel formats, but hopefully + that'll be soon... + 2007-03-10 Sebastien Moutte * gst-libs/gst/audio/gstbaseaudiosink.c:(gst_base_audio_sink_render): diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index a1695fbfe1..30227066c9 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -782,6 +782,12 @@ theora_handle_type_packet (GstTheoraDec * dec, ogg_packet * packet) GST_DEBUG_OBJECT (dec, "frame dimension %dx%d, offset %d:%d", dec->info.frame_width, dec->info.frame_height, dec->info.offset_x, dec->info.offset_y); + if (dec->info.pixelformat != OC_PF_420) { + GST_ELEMENT_ERROR (GST_ELEMENT (dec), STREAM, DECODE, + (NULL), ("pixel formats other than 4:2:0 not yet supported")); + + return GST_FLOW_ERROR; + } if (dec->crop) { /* add black borders to make width/height/offsets even. we need this because