diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-21 13:45:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-21 13:45:36 +0100 |
commit | c3f3c2256325532eb9ee8a44f1f43c31de79eb2f (patch) | |
tree | ba393550cb042440ca0b55962e11d4bcb981d16f /libavformat/mpegts.c | |
parent | a85311ef841b87ddaacf7c198f422db5c1ac2d60 (diff) | |
parent | a717f9904227d7979473bad40c50eb40af41d01d (diff) |
Merge commit 'a717f9904227d7979473bad40c50eb40af41d01d'
* commit 'a717f9904227d7979473bad40c50eb40af41d01d':
mpegts: Share the cleanup code between the demuxer and lavf-internal parser functions
rtpdec_mpeg4: Return one AAC AU per AVPacket
ppc: Include string.h for memset
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r-- | libavformat/mpegts.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index a6e07fae9c..9251f7af32 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2144,16 +2144,20 @@ static int mpegts_read_packet(AVFormatContext *s, return ret; } -static int mpegts_read_close(AVFormatContext *s) +static void mpegts_free(MpegTSContext *ts) { - MpegTSContext *ts = s->priv_data; int i; clear_programs(ts); for(i=0;i<NB_PID_MAX;i++) if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]); +} +static int mpegts_read_close(AVFormatContext *s) +{ + MpegTSContext *ts = s->priv_data; + mpegts_free(ts); return 0; } @@ -2267,10 +2271,7 @@ int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt, void ff_mpegts_parse_close(MpegTSContext *ts) { - int i; - - for(i=0;i<NB_PID_MAX;i++) - av_free(ts->pids[i]); + mpegts_free(ts); av_free(ts); } |