diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index e9a9ef81f9..c7098d08fa 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -1086,7 +1086,9 @@ gst_h264_parse_handle_frame (GstBaseParse * parse, GST_LOG_OBJECT (h264parse, "resuming frame parsing"); } - drain = GST_BASE_PARSE_DRAINING (parse); + /* Always consume the entire input buffer when in_align == ALIGN_AU */ + drain = GST_BASE_PARSE_DRAINING (parse) + || h264parse->in_align == GST_H264_PARSE_ALIGN_AU; nonext = FALSE; current_off = h264parse->current_off; @@ -1918,6 +1920,8 @@ gst_h264_parse_get_timestamp (GstH264Parse * h264parse, g_return_if_fail (out_ts != NULL); upstream = *out_ts; + GST_LOG_OBJECT (h264parse, "Upstream ts %" GST_TIME_FORMAT, + GST_TIME_ARGS (upstream)); if (!frame) { GST_LOG_OBJECT (h264parse, "no frame data -> 0 duration"); @@ -2611,6 +2615,8 @@ gst_h264_parse_set_caps (GstBaseParse * parse, GstCaps * caps) h264parse->packetized = TRUE; } + h264parse->in_align = align; + return TRUE; /* ERRORS */ diff --git a/gst/videoparsers/gsth264parse.h b/gst/videoparsers/gsth264parse.h index f3eb7a5cb7..c71990b120 100644 --- a/gst/videoparsers/gsth264parse.h +++ b/gst/videoparsers/gsth264parse.h @@ -71,6 +71,7 @@ struct _GstH264Parse /* state */ GstH264NalParser *nalparser; guint state; + guint in_align; guint align; guint format; gint current_off;