diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-19 03:48:32 +0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-02-16 19:47:11 +0400 |
commit | 05e4ae833ce9be39880c98a0cfb27edce4722bab (patch) | |
tree | 88c0fbe2b59d751a80ff3db68af027de2d5bb6c3 /libavformat | |
parent | 17b115591fae28b995973e0792260632d6d8dfc7 (diff) |
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.
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/bethsoftvid.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c index e755f83a7e..b01f73a558 100644 --- a/libavformat/bethsoftvid.c +++ b/libavformat/bethsoftvid.c @@ -172,6 +172,8 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt, pkt->pos = position; pkt->stream_index = 0; // use the video decoder, which was initialized as the first stream 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 (vid->palette) { @@ -230,6 +232,7 @@ static int vid_read_packet(AVFormatContext *s, return AVERROR(EIO); } pkt->stream_index = 1; + pkt->flags |= AV_PKT_FLAG_KEY; return 0; case VIDEO_P_FRAME: |