mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-11 18:09:36 +00:00
av_write_trailer() must be done before closing codecs.
Patch by aclarke a xuggle d com Originally committed as revision 17422 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6739fa54b8
commit
de43a23977
@ -523,15 +523,18 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* write the trailer, if any. the trailer must be written
|
||||||
|
* before you close the CodecContexts open when you wrote the
|
||||||
|
* header; otherwise write_trailer may try to use memory that
|
||||||
|
* was freed on av_codec_close() */
|
||||||
|
av_write_trailer(oc);
|
||||||
|
|
||||||
/* close each codec */
|
/* close each codec */
|
||||||
if (video_st)
|
if (video_st)
|
||||||
close_video(oc, video_st);
|
close_video(oc, video_st);
|
||||||
if (audio_st)
|
if (audio_st)
|
||||||
close_audio(oc, audio_st);
|
close_audio(oc, audio_st);
|
||||||
|
|
||||||
/* write the trailer, if any */
|
|
||||||
av_write_trailer(oc);
|
|
||||||
|
|
||||||
/* free the streams */
|
/* free the streams */
|
||||||
for(i = 0; i < oc->nb_streams; i++) {
|
for(i = 0; i < oc->nb_streams; i++) {
|
||||||
av_freep(&oc->streams[i]->codec);
|
av_freep(&oc->streams[i]->codec);
|
||||||
|
Loading…
Reference in New Issue
Block a user