Commit 92a28e9f authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mpegtsenc: Use av_freep() for pids

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 31eaecfe
...@@ -710,7 +710,7 @@ static int mpegts_write_header(AVFormatContext *s) ...@@ -710,7 +710,7 @@ static int mpegts_write_header(AVFormatContext *s)
} }
} }
av_free(pids); av_freep(&pids);
/* if no video stream, use the first stream as PCR */ /* if no video stream, use the first stream as PCR */
if (service->pcr_pid == 0x1fff && s->nb_streams > 0) { if (service->pcr_pid == 0x1fff && s->nb_streams > 0) {
...@@ -778,7 +778,7 @@ static int mpegts_write_header(AVFormatContext *s) ...@@ -778,7 +778,7 @@ static int mpegts_write_header(AVFormatContext *s)
return 0; return 0;
fail: fail:
av_free(pids); av_freep(&pids);
for (i = 0; i < s->nb_streams; i++) { for (i = 0; i < s->nb_streams; i++) {
st = s->streams[i]; st = s->streams[i];
ts_st = st->priv_data; ts_st = st->priv_data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment