diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-12-07 13:06:01 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-12-07 13:06:01 +0400 |
commit | 5321e5336f941d34f135f3723136a961ace45e4a (patch) | |
tree | 0da3cc1b92fd37bd794963edec7103498d508f9c | |
parent | e272db5f38c33cc163e79ced3b46a4c277f27706 (diff) |
Output H.264 in Ogg as AnnexB and don't try to convert to AVC
-rw-r--r-- | demuxer/Demuxers/LAVFStreamInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/demuxer/Demuxers/LAVFStreamInfo.cpp b/demuxer/Demuxers/LAVFStreamInfo.cpp index b20f5f97..2dd25197 100644 --- a/demuxer/Demuxers/LAVFStreamInfo.cpp +++ b/demuxer/Demuxers/LAVFStreamInfo.cpp @@ -205,6 +205,10 @@ STDMETHODIMP CLAVFStreamInfo::CreateVideoMediaType(AVFormatContext *avctx, AVStr mtype.pbFormat = (BYTE *)g_VideoHelper.CreateMPEG1VI(avstream, &mtype.cbFormat, m_containerFormat); } 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) + bAnnexB = TRUE; + } mtype.pbFormat = (BYTE *)g_VideoHelper.CreateMPEG2VI(avstream, &mtype.cbFormat, m_containerFormat, bAnnexB); if (avstream->codec->codec_id == AV_CODEC_ID_H264 && bAnnexB) { mtype.subtype = MEDIASUBTYPE_H264; |