Michael Shell <[email protected]> added the comment:

I have this problem too with a 2010-12-23 export ffmpeg. 
Use of -async 24 results in an error:

Assertion ost->audio_resample failed at ffmpeg.c:898
Aborted (core dumped)

I understand the developers would perfer samples and for users to locate the
exact version when the problem was introduced, but this can sometimes difficult
for us to provide for various reasons (other than simple laziness).

So, I decided to look a bit at the code tree myself. It seems to me that the
problem was likely introduced by Stefano Sabatini's December 12, 2010 fix for
issue 2292:

https://roundup.ffmpeg.org/issue2292

diff code can be see here:

http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=8afab6860512eaaaad37d89b796eaee6c4659771

which made it into r25939.

The failed assertion on my version occurs at line 898 of ffmepg.c:

 av_assert0(ost->audio_resample);

commenting out this line results in a crash without an assertion failure (duh),
probably when it reaches line 902 which accesses ost->resample:

av_resample_compensate(*(struct AVResampleContext**)ost->resample, comp,
enc->sample_rate);

So, the assertion is still required.

Sabatini's changes:

http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=8afab6860512eaaaad37d89b796eaee6c4659771

insert a line (among many others) around line 816 that will cause the assertion
of ost->audio_resample and accesses to ost->resample to fail later unless
ost->audio_resample and ost->resample are somehow set again before then:

ost->resample = NULL;
ost->audio_resample = 0;

So, there needs to be some additional ost->audio_resample and ost->resample
checks or settings after Sabatini patch, but before the assertion line is 
reached.

Sabatini is the one who should look at this.
We know you meant well Stefano! ;)

----------
substatus: needs_more_info -> reproduced

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue2516>
________________________________________________

Reply via email to