diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-12-07 13:20:36 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-12-07 13:20:36 +0400 |
commit | 7d7e785bf04e03a5b46f28744bbff0452b39f4f7 (patch) | |
tree | fa88ec65ba37a85f7c260fd9c534a7c5da51735e | |
parent | 5321e5336f941d34f135f3723136a961ace45e4a (diff) |
Improve Ogg H.264 check
-rw-r--r-- | demuxer/Demuxers/LAVFStreamInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/demuxer/Demuxers/LAVFStreamInfo.cpp b/demuxer/Demuxers/LAVFStreamInfo.cpp index 2dd25197..77eaa314 100644 --- a/demuxer/Demuxers/LAVFStreamInfo.cpp +++ b/demuxer/Demuxers/LAVFStreamInfo.cpp @@ -154,6 +154,7 @@ STDMETHODIMP CLAVFStreamInfo::CreateAudioMediaType(AVFormatContext *avctx, AVStr STDMETHODIMP CLAVFStreamInfo::CreateVideoMediaType(AVFormatContext *avctx, AVStream *avstream) { + unsigned int origCodecTag = avstream->codec->codec_tag; if (avstream->codec->codec_tag == 0 && avstream->codec->codec_id != AV_CODEC_ID_DVVIDEO) { avstream->codec->codec_tag = av_codec_get_tag(mp_bmp_taglists, avstream->codec->codec_id); } @@ -206,7 +207,7 @@ STDMETHODIMP CLAVFStreamInfo::CreateVideoMediaType(AVFormatContext *avctx, AVStr } else if (mtype.formattype == FORMAT_MPEG2Video) { BOOL bAnnexB = (m_containerFormat == "rawvideo" || m_containerFormat == "rtp" || m_containerFormat == "rtsp" || m_containerFormat == "avi"); if (m_containerFormat == "ogg" && avstream->codec->codec_id == AV_CODEC_ID_H264) { - if (!avstream->codec->extradata_size || avstream->codec->extradata[0] != 1) + if (origCodecTag == MKTAG('H','2','6','4') && (!avstream->codec->extradata_size || avstream->codec->extradata[0] != 1)) bAnnexB = TRUE; } mtype.pbFormat = (BYTE *)g_VideoHelper.CreateMPEG2VI(avstream, &mtype.cbFormat, m_containerFormat, bAnnexB); |