mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-26 18:30:52 +08:00
factorize read_header failure freeing code
Originally committed as revision 13837 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -405,7 +405,16 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
|
||||
return 0;
|
||||
fail:
|
||||
if (ic) {
|
||||
int i;
|
||||
av_freep(&ic->priv_data);
|
||||
for(i=0;i<ic->nb_streams;i++) {
|
||||
AVStream *st = ic->streams[i];
|
||||
if (st) {
|
||||
av_free(st->priv_data);
|
||||
av_free(st->codec->extradata);
|
||||
}
|
||||
av_free(st);
|
||||
}
|
||||
}
|
||||
av_free(ic);
|
||||
*ic_ptr = NULL;
|
||||
|
||||
Reference in New Issue
Block a user