[FFmpeg-devel] [PATCH v1] avformat/mux: Set AV_PKT_FLAG_KEY for is_intra_only packet

Limin Wang lance.lmwang at gmail.com
Fri Apr 17 17:01:51 EEST 2020


On Fri, Apr 17, 2020 at 10:24:53AM -0300, James Almer wrote:
> On 4/16/2020 10:23 PM, Limin Wang wrote:
> > On Thu, Apr 16, 2020 at 05:16:35PM +0200, Nicolas George wrote:
> >> Sorry, forgot to reply to that.
> >>
> >> Limin Wang (12020-04-04):
> >>> the md5 framecrc is generated by libavformat/tests/movenc.c, I have no
> >>> clue how the movenc testing work and how to get the real input to check why
> >>> the frame isn't bitexact as I haven't see any subtitle track. 
> >>
> >> Well, check: re-run the test manually, change it to have an actual
> >> output, examine the file. The possibilities are many.
> >>
> >> But tests are there for a reason. If a patch changes the output of
> >> tests, then we cannot accept it unless somebody did examine the changes
> >> very carefully and confirmed they are for the best. Ideally, an
> >> explanation of the changes goes in the commit message.
> > 
> > Thanks, it's difficult to examine how it works for the tests/movenc.c without any
> > documenets. As I can't give good explanation for the md5 changed so I had to stop
> > to update the patch. 
> 
> The change is effectively just the keyframe flag being added to audio
> packets in all of the movenc tests.
> 
> To verify, simply apply
> 
> diff --git a/libavformat/tests/movenc.c b/libavformat/tests/movenc.c
> index 1d15d97ad9..0ff87da7d6 100644
> --- a/libavformat/tests/movenc.c
> +++ b/libavformat/tests/movenc.c
> @@ -256,6 +256,7 @@ static void mux_frames(int n, int c)
>              pkt.dts = pkt.pts = audio_dts;
>              pkt.stream_index = 1;
>              pkt.duration = audio_duration;
> +            pkt.flags |= AV_PKT_FLAG_KEY;
>              audio_dts += audio_duration;
>          } else {
>              if (frames == end_frames)
> 
> without your patch, and you'll get the same changes in the test.
> 
> Feel free to update your patch with what Andreas suggested.

James, thanks for the hint, I'll continue to update the patch with Andreas suggested.

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list