jpegparse: Don't generate timestamp for 0/1 framerates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2194>
This commit is contained in:
Olivier Crête 2021-03-30 12:39:21 -04:00 committed by GStreamer Marge Bot
parent 00e1561bf2
commit 4b47b96ae1

View file

@ -721,7 +721,8 @@ gst_jpeg_parse_pre_push_frame (GstBaseParse * bparse, GstBaseParseFrame * frame)
GstJpegParse *parse = GST_JPEG_PARSE_CAST (bparse); GstJpegParse *parse = GST_JPEG_PARSE_CAST (bparse);
GstBuffer *outbuf = frame->buffer; GstBuffer *outbuf = frame->buffer;
if (parse->has_fps && !GST_CLOCK_TIME_IS_VALID (parse->next_ts)) if (parse->has_fps && parse->framerate_numerator != 0
&& !GST_CLOCK_TIME_IS_VALID (parse->next_ts))
parse->next_ts = bparse->segment.start; parse->next_ts = bparse->segment.start;
GST_BUFFER_TIMESTAMP (outbuf) = parse->next_ts; GST_BUFFER_TIMESTAMP (outbuf) = parse->next_ts;