changeset 31071:adf57737978c

Silence permanent warning messages when decoding H264 over rtsp with live555. Patch by Gil Pedersen, gil A cmi D aau D dk
author cehoyos
date Sun, 02 May 2010 10:47:40 +0000
parents 52eb10f9e51e
children b8cccda750cf
files libmpdemux/demux_rtp_codec.cpp
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_rtp_codec.cpp	Sat May 01 22:49:05 2010 +0000
+++ b/libmpdemux/demux_rtp_codec.cpp	Sun May 02 10:47:40 2010 +0000
@@ -134,12 +134,17 @@
     unsigned char* configData
       = parseH264ConfigStr(subsession->fmtp_spropparametersets(), configLen);
     sh_video->bih = bih = insertVideoExtradata(bih, configData, configLen);
-    delete[] configData;
 #ifdef CONFIG_LIBAVCODEC
+    int fooLen;
+    const uint8_t* fooData;
     avcodec_register_all();
     h264parserctx = av_parser_init(CODEC_ID_H264);
     avcctx = avcodec_alloc_context();
+    // Pass the config to the parser
+    h264parserctx->parser->parser_parse(h264parserctx, avcctx,
+                  &fooData, &fooLen, configData, configLen);
 #endif
+    delete[] configData;
     needVideoFrameRate(demuxer, subsession);
   } else if (strcmp(subsession->codecName(), "H261") == 0) {
     bih->biCompression = sh_video->format