[FFmpeg-devel] [PATCH]Print an error if an unexpected pix_fmt is written to rawvideo in general purpose containers

Michael Niedermayer michaelni at gmx.at
Fri Apr 11 21:46:11 CEST 2014


On Thu, Apr 10, 2014 at 10:41:27PM +0200, Carl Eugen Hoyos wrote:
> On Thursday 10 April 2014 05:07:34 pm Michael Niedermayer wrote:
> 
> 	> > +extern const PixelFormatTag avpriv_pix_fmt_bps_avi[];
> > > +extern const PixelFormatTag avpriv_pix_fmt_bps_mov[];
> >
> > you need av_export somewhere
> 
> Should be fixed.
> 
> > > +                pix_fmt = avpriv_find_pix_fmt(avpriv_pix_fmt_bps_avi,
> > > +                                             
> > > stream->bits_per_coded_sample); +                if (  
> > > !stream->codec_tag
> > > +                    && stream->codec_id == AV_CODEC_ID_RAWVIDEO
> > > +                    && pix_fmt != stream->pix_fmt)
> >
> > i think its not mandatory that pix_fmt is set by the application
> > so a unset pix_fmt should probably be allowed to pass
> >
> > same for mov
> 
> New patch attached.
> 
> Please comment, Carl Eugen

>  libavcodec/raw.c     |   25 +++++++++++++++++++++++++
>  libavcodec/raw.h     |    3 +++
>  libavcodec/rawdec.c  |   31 +++----------------------------
>  libavformat/avienc.c |   11 +++++++++++
>  libavformat/movenc.c |   10 ++++++++++
>  5 files changed, 52 insertions(+), 28 deletions(-)
> 2995ad22435242546672127bff39e178f698dfc0  patchavimovraw.diff

should be ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140411/45ecdcc4/attachment.asc>


More information about the ffmpeg-devel mailing list