[FFmpeg-devel] [PATCH] Only check for invalid codec_id if the codec tag was supposed to be in the current packet.

Michael Niedermayer michaelni
Tue Jan 18 16:21:17 CET 2011


On Tue, Jan 18, 2011 at 04:16:34PM +0100, Michael Niedermayer wrote:
> On Tue, Jan 18, 2011 at 08:55:33AM -0500, Justin Ruggles wrote:
> > 
> > Fixes decoding of stereo VOC files.
> > ---
> >  libavformat/vocdec.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> > 
> 
> >  vocdec.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 1e38294ad07cc0f39e1941852b13ad42997debe5  0001-Only-check-for-invalid-codec_id-if-the-codec-tag-was.patch
> > diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
> > index 7cc37f0..1a77a4b 100644
> > --- a/libavformat/vocdec.c
> > +++ b/libavformat/vocdec.c
> > @@ -133,7 +133,8 @@ voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
> >              voc->remaining_size = 0;
> >              break;
> >          }
> > -        if (dec->codec_id == CODEC_ID_NONE) {
> > +        if ((type == VOC_TYPE_VOICE_DATA || type == VOC_TYPE_NEW_VOICE_DATA) &&
> > +            dec->codec_id == CODEC_ID_NONE) {
> >              av_log(s, AV_LOG_ERROR, "Invalid codec_id\n");
> 
> this check still looks wrong to me
> (example is if there is no such packet at all)

to clarify, the patch is ok as such it improves things but it doesnt fully
fix this check

[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- 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/20110118/0a8fb82f/attachment.pgp>



More information about the ffmpeg-devel mailing list