summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2012-07-26 18:30:04 +0200
committerEdward Hervey <edward@collabora.com>2012-07-26 18:30:04 +0200
commit707b14a2ef6f967b328725848519f34b84bd7ef3 (patch)
tree245bb853eac72fa31f6e4494063fb7c50a7c07f4 /ext
parent1f1bee783fdbc77beeaa262d52013d838c997595 (diff)
mpeg2dec: Avoid dropping first GOP
We use the mpeg2_fbuf_t id field as an integer and not as a pointer, so do not check if it is NULL or not. And cleanup a bit of debug
Diffstat (limited to 'ext')
-rw-r--r--ext/mpeg2dec/gstmpeg2dec.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c
index 09f0b81a..75d28ce3 100644
--- a/ext/mpeg2dec/gstmpeg2dec.c
+++ b/ext/mpeg2dec/gstmpeg2dec.c
@@ -862,9 +862,10 @@ handle_slice (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
gboolean key_frame = FALSE;
GstVideoCodecState *state;
- GST_DEBUG_OBJECT (mpeg2dec, "picture slice/end %p %p %p %p",
+ GST_DEBUG_OBJECT (mpeg2dec,
+ "fbuf:%p display_picture:%p current_picture:%p fbuf->id:%d",
info->display_fbuf, info->display_picture, info->current_picture,
- info->display_fbuf->id);
+ GPOINTER_TO_INT (info->display_fbuf->id));
frame = gst_video_decoder_get_frame (GST_VIDEO_DECODER (mpeg2dec),
GPOINTER_TO_INT (info->display_fbuf->id));
@@ -938,8 +939,9 @@ gst_mpeg2dec_handle_frame (GstVideoDecoder * decoder,
gboolean done = FALSE;
GstFlowReturn ret = GST_FLOW_OK;
- GST_LOG_OBJECT (mpeg2dec, "received buffer, timestamp %"
+ GST_LOG_OBJECT (mpeg2dec, "received frame %d, timestamp %"
GST_TIME_FORMAT ", duration %" GST_TIME_FORMAT,
+ frame->system_frame_number,
GST_TIME_ARGS (frame->pts), GST_TIME_ARGS (frame->duration));
if (!gst_buffer_map (buf, &minfo, GST_MAP_READ)) {
@@ -1001,12 +1003,12 @@ gst_mpeg2dec_handle_frame (GstVideoDecoder * decoder,
case STATE_END:
GST_DEBUG_OBJECT (mpeg2dec, "end");
case STATE_SLICE:
- if (info->display_fbuf && info->display_fbuf->id) {
+ if (info->display_fbuf) {
ret = handle_slice (mpeg2dec, info);
} else {
GST_DEBUG_OBJECT (mpeg2dec, "no picture to display");
}
- if (info->discard_fbuf && info->discard_fbuf->id)
+ if (info->discard_fbuf)
gst_mpeg2dec_discard_buffer (mpeg2dec,
GPOINTER_TO_INT (info->discard_fbuf->id));
if (state != STATE_SLICE) {