Message ID | e8c521c9-4b19-378e-43ee-7b375dcb8c5b@gmail.com |
---|---|
State | Accepted |
Commit | cfe1a9d311de6c36641cf295004cdbc77d7b600c |
Headers | show |
On Thu, Mar 22, 2018 at 11:04:21PM +0530, Gyan Doshi wrote: > Set the packet flag using constant as well. > segafilm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > d9d4db403c46a179ea93aab0d85904e7b4a831d2 0001-avformat-segafilm-fix-keyframe-detection-and-set-pac.patch > From 905cc5f1146c957ae4290b44a06a22a7524a87de Mon Sep 17 00:00:00 2001 > From: Gyan Doshi <gyandoshi@gmail.com> > Date: Wed, 21 Mar 2018 18:59:33 +0530 > Subject: [PATCH] avformat/segafilm - fix keyframe detection and set packet > flags > > Streams from a Segafilm cpk file can't be streamcopied because > keyframe flag isn't correctly set in stream index and > said flag is never conveyed to the packet > > Fixes #7091 > --- > libavformat/segafilm.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) should be ok [...]
On 3/24/2018 7:39 AM, Michael Niedermayer wrote: > On Thu, Mar 22, 2018 at 11:04:21PM +0530, Gyan Doshi wrote: >> >> Fixes #7091 >> --- >> libavformat/segafilm.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) > > should be ok Ping for push. There's a pending patch by another user blocked by this one. Thanks, Gyan
On 3/26/2018 3:27 PM, Gyan Doshi wrote: > On 3/24/2018 7:39 AM, Michael Niedermayer wrote: >> On Thu, Mar 22, 2018 at 11:04:21PM +0530, Gyan Doshi wrote: > >>> >>> Fixes #7091 >>> --- >>> libavformat/segafilm.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> should be ok > > > Ping for push. There's a pending patch by another user blocked by this one. > > Thanks, > Gyan Pushed.
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c index 1fdef50cc7..4c0cca0140 100644 --- a/libavformat/segafilm.c +++ b/libavformat/segafilm.c @@ -239,7 +239,7 @@ static int film_read_header(AVFormatContext *s) } else { film->sample_table[i].stream = film->video_stream_index; film->sample_table[i].pts = AV_RB32(&scratch[8]) & 0x7FFFFFFF; - film->sample_table[i].keyframe = (scratch[8] & 0x80) ? 0 : 1; + film->sample_table[i].keyframe = (scratch[8] & 0x80) ? AVINDEX_KEYFRAME : 0; video_frame_counter++; if (film->video_type) av_add_index_entry(s->streams[film->video_stream_index], @@ -286,6 +286,7 @@ static int film_read_packet(AVFormatContext *s, pkt->stream_index = sample->stream; pkt->pts = sample->pts; + pkt->flags |= sample->keyframe ? AV_PKT_FLAG_KEY : 0; film->current_sample++;
Set the packet flag using constant as well. From 905cc5f1146c957ae4290b44a06a22a7524a87de Mon Sep 17 00:00:00 2001 From: Gyan Doshi <gyandoshi@gmail.com> Date: Wed, 21 Mar 2018 18:59:33 +0530 Subject: [PATCH] avformat/segafilm - fix keyframe detection and set packet flags Streams from a Segafilm cpk file can't be streamcopied because keyframe flag isn't correctly set in stream index and said flag is never conveyed to the packet Fixes #7091 --- libavformat/segafilm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)