Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
transcode: free extradata from context structures
  • Loading branch information
perexg committed Oct 20, 2014
1 parent 06236ad commit 8715176
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plumbing/transcoding.c
Expand Up @@ -1239,6 +1239,8 @@ transcoder_destroy_subtitle(transcoder_t *t, transcoder_stream_t *ts)
subtitle_stream_t *ss = (subtitle_stream_t*)ts;

if(ss->sub_ictx) {
av_freep(&ss->sub_ictx->extradata);
ss->sub_ictx->extradata_size = 0;
avcodec_close(ss->sub_ictx);
av_free(ss->sub_ictx);
}
Expand Down Expand Up @@ -1318,6 +1320,8 @@ transcoder_destroy_audio(transcoder_t *t, transcoder_stream_t *ts)
audio_stream_t *as = (audio_stream_t*)ts;

if(as->aud_ictx) {
av_freep(&as->aud_ictx->extradata);
as->aud_ictx->extradata_size = 0;
avcodec_close(as->aud_ictx);
av_free(as->aud_ictx);
}
Expand Down Expand Up @@ -1420,6 +1424,8 @@ transcoder_destroy_video(transcoder_t *t, transcoder_stream_t *ts)
video_stream_t *vs = (video_stream_t*)ts;

if(vs->vid_ictx) {
av_freep(&vs->vid_ictx->extradata);
vs->vid_ictx->extradata_size = 0;
avcodec_close(vs->vid_ictx);
av_free(vs->vid_ictx);
}
Expand Down

0 comments on commit 8715176

Please sign in to comment.