1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-29 05:57:37 +02:00

lavf: add an AVStream field for exporting stream-global side data

This commit is contained in:
Anton Khirnov
2014-02-19 12:10:32 +01:00
parent 0e2c3ee9a3
commit 25b3258656
4 changed files with 34 additions and 2 deletions

View File

@@ -2595,7 +2595,7 @@ int av_read_pause(AVFormatContext *s)
void avformat_free_context(AVFormatContext *s)
{
int i;
int i, j;
AVStream *st;
av_opt_free(s);
@@ -2605,6 +2605,12 @@ void avformat_free_context(AVFormatContext *s)
for (i = 0; i < s->nb_streams; i++) {
/* free all data in a stream component */
st = s->streams[i];
for (j = 0; j < st->nb_side_data; j++)
av_freep(&st->side_data[j].data);
av_freep(&st->side_data);
st->nb_side_data = 0;
if (st->parser) {
av_parser_close(st->parser);
}