Commit 05e4ae83 authored by Justin Ruggles's avatar Justin Ruggles

bethsoftvid: set packet key frame flag for audio and I-frame video packets.

Fixes avconv video stream copy of bethsoft video, which was skipping all
video frames unless the copyinkf option was used.
parent 17b11559
...@@ -172,6 +172,8 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt, ...@@ -172,6 +172,8 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt,
pkt->pos = position; pkt->pos = position;
pkt->stream_index = 0; // use the video decoder, which was initialized as the first stream pkt->stream_index = 0; // use the video decoder, which was initialized as the first stream
pkt->pts = vid->video_pts; pkt->pts = vid->video_pts;
if (block_type == VIDEO_I_FRAME)
pkt->flags |= AV_PKT_FLAG_KEY;
/* if there is a new palette available, add it to packet side data */ /* if there is a new palette available, add it to packet side data */
if (vid->palette) { if (vid->palette) {
...@@ -230,6 +232,7 @@ static int vid_read_packet(AVFormatContext *s, ...@@ -230,6 +232,7 @@ static int vid_read_packet(AVFormatContext *s,
return AVERROR(EIO); return AVERROR(EIO);
} }
pkt->stream_index = 1; pkt->stream_index = 1;
pkt->flags |= AV_PKT_FLAG_KEY;
return 0; return 0;
case VIDEO_P_FRAME: case VIDEO_P_FRAME:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment