mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
basevideodecoder: handle missing framerate when calculating timestamp
This commit is contained in:
parent
cfe85ad780
commit
9b6e819247
1 changed files with 3 additions and 3 deletions
|
@ -1553,7 +1553,7 @@ gst_base_video_decoder_get_timestamp (GstBaseVideoDecoder * base_video_decoder,
|
|||
{
|
||||
GstVideoState *state = &GST_BASE_VIDEO_CODEC (base_video_decoder)->state;
|
||||
|
||||
if (state->fps_d == 0) {
|
||||
if (state->fps_d == 0 || state->fps_n == 0) {
|
||||
return -1;
|
||||
}
|
||||
if (picture_number < base_video_decoder->base_picture_number) {
|
||||
|
@ -1574,7 +1574,7 @@ gst_base_video_decoder_get_field_timestamp (GstBaseVideoDecoder *
|
|||
{
|
||||
GstVideoState *state = &GST_BASE_VIDEO_CODEC (base_video_decoder)->state;
|
||||
|
||||
if (state->fps_d == 0) {
|
||||
if (state->fps_d == 0 || state->fps_n == 0) {
|
||||
return GST_CLOCK_TIME_NONE;
|
||||
}
|
||||
if (field_offset < 0) {
|
||||
|
@ -1592,7 +1592,7 @@ gst_base_video_decoder_get_field_duration (GstBaseVideoDecoder *
|
|||
{
|
||||
GstVideoState *state = &GST_BASE_VIDEO_CODEC (base_video_decoder)->state;
|
||||
|
||||
if (state->fps_d == 0) {
|
||||
if (state->fps_d == 0 || state->fps_n == 0) {
|
||||
return GST_CLOCK_TIME_NONE;
|
||||
}
|
||||
if (n_fields < 0) {
|
||||
|
|
Loading…
Reference in a new issue