mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
ext/mpeg2dec/gstmpeg2dec.c: Assume pixel-aspect-ratio of 4:3 if libmpeg2dec doesn't give us any PAR whatsoever (rathe...
Original commit message from CVS: * ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_negotiate_format): Assume pixel-aspect-ratio of 4:3 if libmpeg2dec doesn't give us any PAR whatsoever (rather than using 0/0, which will lead to an abort later on). Fixes #345184.
This commit is contained in:
parent
7a9ac30688
commit
17514d1696
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-06-19 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_negotiate_format):
|
||||
Assume pixel-aspect-ratio of 4:3 if libmpeg2dec doesn't give us
|
||||
any PAR whatsoever (rather than using 0/0, which will lead to
|
||||
an abort later on). Fixes #345184.
|
||||
|
||||
2006-06-17 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
Patch by: Michael Dominic K. < mdk at mdk org pl>
|
||||
|
|
|
@ -542,6 +542,12 @@ gst_mpeg2dec_negotiate_format (GstMpeg2dec * mpeg2dec)
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
if (mpeg2dec->pixel_width == 0 || mpeg2dec->pixel_height == 0) {
|
||||
GST_WARNING_OBJECT (mpeg2dec, "Unknown pixel-aspect-ratio - assuming 4:3");
|
||||
mpeg2dec->pixel_width = 4;
|
||||
mpeg2dec->pixel_height = 3;
|
||||
}
|
||||
|
||||
caps = gst_caps_new_simple ("video/x-raw-yuv",
|
||||
"format", GST_TYPE_FOURCC, fourcc,
|
||||
"width", G_TYPE_INT, mpeg2dec->width,
|
||||
|
|
Loading…
Reference in a new issue