[FFmpeg-devel] [PATCH] avienc : Don't write invalid stream headers.

Jai Menon jmenon86
Wed Jun 16 12:09:33 CEST 2010


On Wed, Jun 16, 2010 at 2:25 PM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> On date Wednesday 2010-06-16 13:41:15 +0530, Jai Menon encoded:
>> ---
>> ?libavformat/avienc.c | ? ?2 +-
>> ?1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavformat/avienc.c b/libavformat/avienc.c
>> index b4a31ec..6c6291f 100644
>> --- a/libavformat/avienc.c
>> +++ b/libavformat/avienc.c
>> @@ -235,7 +235,7 @@ static int avi_write_header(AVFormatContext *s)
>> ? ? ? ? ? ? stream->codec_id == CODEC_ID_XSUB)
>> ? ? ? ? ? ? ?put_le32(pb, stream->codec_tag);
>> ? ? ? ? ?else
>> - ? ? ? ? ? ?put_le32(pb, 1);
>> + ? ? ? ? ? ?return -1;
>
> AVERROR(EINVAL)

indeed. also, we need to use proper error codes at a lot of other
places. i'll see if i can post a patch for those later.

i'll apply a fixed variant if the patch is ok'd.

-- 
Jai Menon



More information about the ffmpeg-devel mailing list