[FFmpeg-cvslog] mpegts: check that codec is not open in mpegts_find_stream_type
Michael Niedermayer
git at videolan.org
Mon Dec 3 18:03:09 CET 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 3 17:34:38 2012 +0100| [03290ffb57b25734120024e6943c7feca7bf2060] | committer: Michael Niedermayer
mpegts: check that codec is not open in mpegts_find_stream_type
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=03290ffb57b25734120024e6943c7feca7bf2060
---
libavformat/mpegts.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 7380a80..aa7bde5 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -598,6 +598,11 @@ static const StreamType DESC_types[] = {
static void mpegts_find_stream_type(AVStream *st,
uint32_t stream_type, const StreamType *types)
{
+ if (avcodec_is_open(st->codec)) {
+ av_log(NULL, AV_LOG_DEBUG, "cannot set stream info, codec is open\n");
+ return;
+ }
+
for (; types->stream_type; types++) {
if (stream_type == types->stream_type) {
st->codec->codec_type = types->codec_type;
More information about the ffmpeg-cvslog
mailing list