[Ffmpeg-cvslog] r8162 - trunk/ffmpeg.c
Luca Abeni
lucabe72
Wed Feb 28 16:18:55 CET 2007
Hi Alex,
Alex Beregszaszi wrote:
[...]
>> @@ -1614,7 +1614,7 @@ static int av_encode(AVFormatContext **o
>> avcodec_get_frame_defaults(&ost->pict_tmp);
>> if( avpicture_alloc( (AVPicture*)&ost->pict_tmp, codec->pix_fmt,
>> codec->width, codec->height ) )
>> - goto fail;
>> + exit(1);
>
> What about assert?
Well, I think Michael said that the patched looked ok, so I committed it
without thinking about other alternatives. Anyway, similar code in
ffmpeg.c uses exit(1) (look at few lines after the one changed by my
patch); adding assert() will introduced yet another (inconsistent)
different way to handle errors...
But if people want it, I am fine with assert too... Unfortunately I am
in hurry right now, so I'll not be able to change this commit before
tomorrow morning.
> And thus fix the real reason for this. Someone (you?)
> said the reason is that width/height are set to zero.
I do not remember all the details, but I think this was triggered by a
broken stream... So exiting the program seems the best thing to do.
The problem with previous code was that ffmpeg.c called
sws_freeContext() even if no sws context had been initialized.
Luca
More information about the ffmpeg-cvslog
mailing list