[FFmpeg-devel] [PATCH] Do not override pix_fmt in rawdec.c

Tomas Härdin tomas.hardin
Wed Jun 9 11:38:14 CEST 2010


On Mon, 2010-06-07 at 22:23 +0200, Michael Niedermayer wrote:
> >  avcodec.h |    5 ++++-
> >  rawdec.c  |    2 ++
> >  2 files changed, 6 insertions(+), 1 deletion(-)
> > d44a164fed7c1a5cd69f362d521ef66aad6f42b2  rawdec_pix_fmt2.patch
> > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > index a6f6b04..d0aa162 100644
> > --- a/libavcodec/avcodec.h
> > +++ b/libavcodec/avcodec.h
> > @@ -1120,8 +1120,11 @@ typedef struct AVCodecContext {
> >  
> >      /**
> >       * Pixel format, see PIX_FMT_xxx.
> > +     * May be set by the demuxer, especially when demuxing rawvideo.
> > +     * Some demuxers use bits_per_coded_sample or codec_tag for this purpose instead.
> 
> > +     * Some codecs may override this value. The rawvideo decoder will not.
> 
> i really would like to avoid adding special cases
> 
> 
> >       * - encoding: Set by user.
> > -     * - decoding: Set by libavcodec.
> > +     * - decoding: Set by user and/or libavcodec.
> 
> i would say
> Set by user if known, overridden by libavcodec if known

OK. I changed the explanation a bit as well. Patch attached. I also
reran the regtests against latest SVN, which worked fine.

For future reference, I searched for all files where both
CODEC_ID_RAWVIDEO and bits_per_coded_sample are used in a video context.
This in order to hopefully simplify rawdec.c later.

AVI: avidec.c, riff.c
MOV: mov.c, movenc.c
Others: utils.c, nsvdec.c, vwfcap.c, rawdec.c
Soon: mxf.c, mxfdec.c

/Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rawdec_pix_fmt3.patch
Type: text/x-patch
Size: 1432 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100609/360e387d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100609/360e387d/attachment.pgp>



More information about the ffmpeg-devel mailing list