mirror of https://git.ffmpeg.org/ffmpeg.git
amovie: avoid crash in amovie_request_frame() if no samplesref is available
The crash occurrs when a frame is successfully decoded, but no decoded data is immediately available (typically happens with ogg/vorbis).
This commit is contained in:
parent
81852ef5d6
commit
2b1a4c5b34
|
@ -446,8 +446,10 @@ static int amovie_request_frame(AVFilterLink *outlink)
|
||||||
|
|
||||||
if (movie->is_done)
|
if (movie->is_done)
|
||||||
return AVERROR_EOF;
|
return AVERROR_EOF;
|
||||||
|
do {
|
||||||
if ((ret = amovie_get_samples(outlink)) < 0)
|
if ((ret = amovie_get_samples(outlink)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
} while (!movie->samplesref);
|
||||||
|
|
||||||
avfilter_filter_samples(outlink, avfilter_ref_buffer(movie->samplesref, ~0));
|
avfilter_filter_samples(outlink, avfilter_ref_buffer(movie->samplesref, ~0));
|
||||||
avfilter_unref_buffer(movie->samplesref);
|
avfilter_unref_buffer(movie->samplesref);
|
||||||
|
|
Loading…
Reference in New Issue