On 01/03/15 21:22, Diego Biurrun wrote: > On Sat, Feb 28, 2015 at 09:12:57PM +0100, Andreas Cadhalpun wrote: >> From 850352d0e1c262b434094fb19787bbd5b6bf6c57 Mon Sep 17 00:00:00 2001 >> From: Andreas Cadhalpun <[email protected]> >> Date: Sat, 28 Feb 2015 20:58:31 +0100 >> Subject: [PATCH] avformat/flvenc: check that the codec_tag fits in one byte >> >> flags is later written with avio_w8 and if it doesn't fit in one byte it >> triggers an av_assert2. >> >> --- a/libavformat/flvenc.c >> +++ b/libavformat/flvenc.c >> @@ -537,7 +537,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket >> *pkt) >> avio_w8(pb, FLV_TAG_TYPE_VIDEO); >> >> flags = enc->codec_tag; >> - if (flags == 0) { >> + if (flags == 0 || flags < -128 || flags > 255) { >> av_log(s, AV_LOG_ERROR, >> "Video codec '%s' is not compatible with FLV\n", >> avcodec_get_name(enc->codec_id)); > > Maybe flags should be uint8_t instead? >
No, the proper way is to blacklist/whitelist the supported codecs for flv. lu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
