summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-07-30 22:08:34 +0000
committerjstebbins <[email protected]>2014-07-30 22:08:34 +0000
commit870e2d7a5562d74e2b2419f9f25eb7649f095131 (patch)
treec0e6e7abbc7f6676a3b2e21d207b8d9f98363b69 /libhb
parent78ba19204309f958735b298eab542cc0b0a17e43 (diff)
libhb: add i-frame detection for mpeg4 ts/ps streams
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6247 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/stream.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index 37f1fc3a2..df19423f9 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -1357,6 +1357,21 @@ static int isIframe( hb_stream_t *stream, const uint8_t *buf, int len )
// didn't find an I-frame
return 0;
}
+ if ( pes->stream_type == 0x10 || pes->codec_param == AV_CODEC_ID_MPEG4 )
+ {
+ // we have an vc1 stream
+ for (ii = 0; ii < len-1; ii++)
+ {
+ strid = (strid << 8) | buf[ii];
+ if ( strid == 0x1b6 )
+ {
+ if ((buf[ii+1] & 0xC0) == 0)
+ 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.