diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-10-12 03:38:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-10-12 04:15:23 +0200 |
commit | fe19e138cd0dfd786e80d7544789624d5cc86239 (patch) | |
tree | 97c3871b55d19f53ed5977671d7faded44cf09b1 /libavformat/cdg.c | |
parent | 045c5283c323a668fb0a989a3483d980fedd8f65 (diff) | |
download | ffmpeg-fe19e138cd0dfd786e80d7544789624d5cc86239.tar.gz |
cdg: Try to detect keyframes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/cdg.c')
-rw-r--r-- | libavformat/cdg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/cdg.c b/libavformat/cdg.c index 1f1442b100..9bcc285897 100644 --- a/libavformat/cdg.c +++ b/libavformat/cdg.c @@ -53,6 +53,10 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) pkt->stream_index = 0; pkt->dts=pkt->pts= s->streams[0]->cur_dts; + + if(ret>5 && (pkt->data[0]&0x3F) == 9 && (pkt->data[1]&0x3F)==1 && !(pkt->data[2+2+1] & 0x0F)){ + pkt->flags = AV_PKT_FLAG_KEY; + } return ret; } |