[FFmpeg-devel] [PATCH v6 1/2] lavf/isom: support for demuxing and remuxing of MPEG-H 3D Audio in MP4

Tsuchiya, Yuki (SHES) Yuki.Tsuchiya at sony.com
Wed Dec 11 12:15:17 EET 2019

Hello James,

´╗┐On 2019/12/10 22:30, "James Almer" <jamrial at gmail.com> wrote:

    >> diff --git a/libavformat/utils.c b/libavformat/utils.c
    >> index 8196442dd1..70f9e23d8c 100644
    >> --- a/libavformat/utils.c
    >> +++ b/libavformat/utils.c
    >> @@ -1021,7 +1021,8 @@ static int is_intra_only(enum AVCodecID id)
    >>      const AVCodecDescriptor *d = avcodec_descriptor_get(id);
    >>      if (!d)
    >>          return 0;
    >> -    if (d->type == AVMEDIA_TYPE_VIDEO && !(d->props & AV_CODEC_PROP_INTRA_ONLY))
    >> +    if ((d->type == AVMEDIA_TYPE_VIDEO && !(d->props & AV_CODEC_PROP_INTRA_ONLY)) ||
    >> +        id == AV_CODEC_ID_MPEGH_3D_AUDIO)
    >Instead of changing generic code like this to prevent all MPEG-H 3D
    >Audio packets from being tagged as key, you should add a custom function
    >much like the VC1 and the TrueHD ones called at the end of
    >ff_mov_write_packet() to set the MOV_SYNC_SAMPLE flag and increase the
    >track->has_keyframes counter where corresponds.

If the modification in the is_intra_only() is removed, all demuxed frames will be tagged as key frame.
This means that all single frames got from av_read_frame() will be key frame so it is difficult to start decoding from actual key frame.
I think this modification or something like other method for keeping key frame information from stss box is required.
Do you have any idea?
    ffmpeg-devel mailing list
    ffmpeg-devel at ffmpeg.org
    To unsubscribe, visit link above, or email
    ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

More information about the ffmpeg-devel mailing list