diff options
author | cehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-08-11 18:28:26 +0000 |
---|---|---|
committer | cehoyos <cehoyos@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-08-11 18:28:26 +0000 |
commit | bb6c23de0c3d2a76325f365efe25128482d004b0 (patch) | |
tree | 2cc13760b091659375280f0280cb06041948d09c /libmpdemux/demux_rtp_codec.cpp | |
parent | 6960e4c1b1ccccba6ccd7e48d5c882a527632b81 (diff) | |
download | mpv-bb6c23de0c3d2a76325f365efe25128482d004b0.tar.bz2 mpv-bb6c23de0c3d2a76325f365efe25128482d004b0.tar.xz |
Fix a crash when playing some H264 over rtsp streams: Do pass an
AVCodecContext to the H264 parser.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29493 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_rtp_codec.cpp')
-rw-r--r-- | libmpdemux/demux_rtp_codec.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libmpdemux/demux_rtp_codec.cpp b/libmpdemux/demux_rtp_codec.cpp index bb129c0dc3..fbfbb3258f 100644 --- a/libmpdemux/demux_rtp_codec.cpp +++ b/libmpdemux/demux_rtp_codec.cpp @@ -30,6 +30,7 @@ extern "C" { #ifdef CONFIG_LIBAVCODEC AVCodecParserContext * h264parserctx; #endif +void *avcctx; // Copied from vlc static unsigned char* parseH264ConfigStr( char const* configStr, @@ -137,6 +138,7 @@ void rtpCodecInitialize_video(demuxer_t* demuxer, #ifdef CONFIG_LIBAVCODEC avcodec_register_all(); h264parserctx = av_parser_init(CODEC_ID_H264); + avcctx = avcodec_alloc_context(); #endif needVideoFrameRate(demuxer, subsession); } else if (strcmp(subsession->codecName(), "H261") == 0) { |