diff options
author | jstebbins <[email protected]> | 2008-12-03 16:18:51 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-12-03 16:18:51 +0000 |
commit | 5557082ecbe2f96bc251b72483c9ed8aaa2da1a7 (patch) | |
tree | 3fe4c9a512421fbfad3d3350d22999908644f065 /libhb/stream.c | |
parent | 202a40c7c928b9d820aa86ac956437897aa17c81 (diff) |
Found the ffmpeg initialization problem with VC-1 video.
So now we can use our own demuxer for streams with VC-1.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1995 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/stream.c')
-rwxr-xr-x | libhb/stream.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/libhb/stream.c b/libhb/stream.c index d6079d81d..1b03ae6f6 100755 --- a/libhb/stream.c +++ b/libhb/stream.c @@ -1941,14 +1941,6 @@ static void hb_ts_stream_find_pids(hb_stream_t *stream) if ((stream->ts_number_video_pids > 0) && (stream->ts_number_audio_pids > 0)) break; } - // XXX - until we figure out how to handle VC1 just bail when we find it so - // that ffmpeg will claim the input stream. - if ( stream->ts_stream_type[0] == 0xea ) - { - stream->ts_number_video_pids = 0; - stream->ts_number_audio_pids = 0; - return; - } hb_log("hb_ts_stream_find_pids - found the following PIDS"); hb_log(" Video PIDS : "); @@ -2134,6 +2126,22 @@ static int isIframe( hb_stream_t *stream, const uint8_t *buf, int adapt_len ) // didn't find an I-frame return 0; } + if ( stream->ts_stream_type[0] == 0xea ) + { + // we have an vc1 stream + for (i = 13 + adapt_len; i < 188; i++) + { + strid = (strid << 8) | buf[i]; + if ( strid == 0x10f ) + { + // the ffmpeg vc1 decoder requires a seq hdr code in the first + // frame. + return 1; + } + } + // didn't find an I-frame + return 0; + } // we don't understand the stream type so just say "yes" otherwise // we'll discard all the video. |