Browse Source

cdg: Try to detect keyframes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Michael Niedermayer 14 years ago
parent
commit
fe19e138cd
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavformat/cdg.c

+ 4
- 0
libavformat/cdg.c View File

@@ -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;
}



Loading…
Cancel
Save