hdsenc: Clear the previous codec tag when setting up the chained muxer

The chained flv muxer wants one set of tags - normally this set
could be signaled via the AVOutputFormat codec_tag field (as
smoothstreamingenc and dashenc do). hdsenc doesn't signal it, since
the FLV codec tag arrays aren't exported from flvenc.c. This can
lead to the caller keeping an original codec tag from the originating
container here, which would then be a mismatch for the FLV muxer.
Since we don't really care about what codec tag the caller might
have set, just clear it and let the lavf muxer layer set the right
one for the chained FLV muxer later instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
pull/98/merge
Martin Storsjö 10 years ago
parent f918b8a293
commit 7fd10f66b7
  1. 1
      libavformat/hdsenc.c

@ -395,6 +395,7 @@ static int hds_write_header(AVFormatContext *s)
goto fail;
}
avcodec_copy_context(st->codec, s->streams[i]->codec);
st->codec->codec_tag = 0;
st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
st->time_base = s->streams[i]->time_base;
}

Loading…
Cancel
Save