[FFmpeg-devel] [PATCH]Report "unknown codec" instead of "unspecifed size" if the codec is unknown

Michael Niedermayer michaelni at gmx.at
Sun Jun 1 19:37:19 CEST 2014


On Sun, Jun 01, 2014 at 07:28:31PM +0200, Carl Eugen Hoyos wrote:
> On Sunday 01 June 2014 07:21:10 pm Michael Niedermayer wrote:
> > On Sun, Jun 01, 2014 at 02:20:17PM +0200, Carl Eugen Hoyos wrote:
> > > Currently, has_codec_parameters() fails with "unspecified size" if
> > > nothing is known about a video stream, I believe it makes more 
> > > sense to report "unknown codec" with highest priority.
> 
> > > +    if (avctx->codec_id == AV_CODEC_ID_NONE)
> > > +        FAIL("unknown codec");
> >
> > ID_NONE is allowed in the AVMEDIA_TYPE_DATA case prior to this patch
> 
> New patch attached.
> 
> Thank you, Carl Eugen

>  utils.c |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> d4cd58b52090e47909f55dc8fb36f8faea6b37e3  patchunkowncodec2.diff
> diff --git a/libavformat/utils.c b/libavformat/utils.c

LGTM

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140601/bfdf2264/attachment.asc>


More information about the ffmpeg-devel mailing list