mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 13:55:41 +00:00
ext/mpeg2dec/gstmpeg2dec.c: Prime libmpeg2's pumps with some null custom buffers to ensure it ask us to discard garba...
Original commit message from CVS: * ext/mpeg2dec/gstmpeg2dec.c: (handle_sequence): Prime libmpeg2's pumps with some null custom buffers to ensure it ask us to discard garbage later yay.
This commit is contained in:
parent
19a1c51069
commit
57cd4f20f1
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-11-25 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* ext/mpeg2dec/gstmpeg2dec.c: (handle_sequence):
|
||||
Prime libmpeg2's pumps with some null custom buffers
|
||||
to ensure it ask us to discard garbage later yay.
|
||||
|
||||
2005-11-25 Michael Smith <msmith@fluendo.com>
|
||||
|
||||
* ext/a52dec/gsta52dec.c: (gst_a52dec_init),
|
||||
|
|
|
@ -527,6 +527,7 @@ handle_sequence (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
|
|||
gint i;
|
||||
GstBuffer *buf;
|
||||
GstFlowReturn ret;
|
||||
guint8 *dummybuf[3] = { NULL, NULL, NULL };
|
||||
|
||||
mpeg2dec->width = info->sequence->picture_width;
|
||||
mpeg2dec->height = info->sequence->picture_height;
|
||||
|
@ -560,6 +561,11 @@ handle_sequence (GstMpeg2dec * mpeg2dec, const mpeg2_info_t * info)
|
|||
goto negotiate_failed;
|
||||
|
||||
mpeg2_custom_fbuf (mpeg2dec->decoder, 1);
|
||||
/* Pump in some null buffers, because otherwise libmpeg2 doesn't
|
||||
* initialise the discard_fbuf->id */
|
||||
mpeg2_set_buf (mpeg2dec->decoder, dummybuf, NULL);
|
||||
mpeg2_set_buf (mpeg2dec->decoder, dummybuf, NULL);
|
||||
mpeg2_set_buf (mpeg2dec->decoder, dummybuf, NULL);
|
||||
|
||||
ret = gst_mpeg2dec_alloc_buffer (mpeg2dec, mpeg2dec->offset, &buf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
|
|
Loading…
Reference in a new issue