basevideodecoder: Better handling of invalid par

This commit is contained in:
David Schleef 2011-06-03 19:36:12 -07:00
parent 33d96b69be
commit 929603d56c

View file

@ -1808,12 +1808,12 @@ gst_base_video_decoder_set_src_caps (GstBaseVideoDecoder * base_video_decoder)
g_return_val_if_fail (state->height != 0, FALSE);
/* sanitize */
if (state->fps_d == 0) {
if (state->fps_n == 0 || state->fps_d == 0) {
state->fps_n = 0;
state->fps_d = 1;
}
if (state->par_d == 0) {
state->par_n = 0;
if (state->par_n == 0 || state->par_d == 0) {
state->par_n = 1;
state->par_d = 1;
}