[FFmpeg-devel] [PATCH] wtv: ignore empty data_guid chunks
Peter Ross
pross
Sun Feb 13 23:38:47 CET 2011
On Sun, Feb 13, 2011 at 09:38:48AM -0500, Ronald S. Bultje wrote:
> Hi,
>
> On Sat, Feb 12, 2011 at 10:42 PM, Peter Ross <pross at xvid.org> wrote:
> > ---
> > ?libavformat/wtv.c | ? ?2 +-
> > ?1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/libavformat/wtv.c b/libavformat/wtv.c
> > index 7a8e8f5..b74a36c 100644
> > --- a/libavformat/wtv.c
> > +++ b/libavformat/wtv.c
> > @@ -892,7 +892,7 @@ static int parse_chunks(AVFormatContext *s, int mode, int64_t seekts, int *len_p
> > ? ? ? ? ? ? }
> > ? ? ? ? } else if (!ff_guidcmp(g, data_guid)) {
> > ? ? ? ? ? ? int stream_index = ff_find_stream_index(s, sid);
> > - ? ? ? ? ? ?if (mode == SEEK_TO_DATA && stream_index >= 0) {
> > + ? ? ? ? ? ?if (mode == SEEK_TO_DATA && stream_index >= 0 && len > 32) {
> > ? ? ? ? ? ? ? ? WtvStream *wst = s->streams[stream_index]->priv_data;
> > ? ? ? ? ? ? ? ? wst->seen_data = 1;
> > ? ? ? ? ? ? ? ? if (len_ptr) {
> > --
> > 1.7.1
>
> Does this prevent a crash, or do empty data chunks actually occur?
> Either way, queued.
Yep, they occur in some samples, and appear at the beginning of the stream.
The presence of these empty AV_NOPTS_VALUE packets affects the calculation of
last_dts in av_find_stream_info().
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110214/4353ec2f/attachment.pgp>
More information about the ffmpeg-devel
mailing list