[FFmpeg-devel] [PATCH] AC3 audio issue in m2ts for Blu-ray Players.

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Aug 2 13:48:06 CEST 2012


kifayat ullah <kifayat.ullah <at> yahoo.com> writes:

> Tabs are corrected in the attached patch.

Thank you for working on this issue!

> --- a/libavformat/mpegtsenc.c
> +++ b/libavformat/mpegtsenc.c
> @@ -828,7 +828,6 @@ static uint8_t *get_ts_payload_start
>      else
>          return pkt + 4;
>  }
> -

Please remove this cosmetic change, it makes reviewing the 
patch more difficult

> -    } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
> -               (st->codec->codec_id == CODEC_ID_MP2 ||
> -                st->codec->codec_id == CODEC_ID_MP3 ||
> -                st->codec->codec_id == CODEC_ID_AAC)) {
> -        *q++ = 0xc0;
> +    } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO){
> +               if (st->codec->codec_id == CODEC_ID_MP2 ||
> +                    st->codec->codec_id == CODEC_ID_MP3 ||
> +                    st->codec->codec_id == CODEC_ID_AAC) {
> +                        *q++ = 0xc0;
> +                } else if (ts->m2ts_mode &&

Do I miss something or is this equivalent to the following?

 } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
             (st->codec->codec_id == CODEC_ID_MP2 ||
              st->codec->codec_id == CODEC_ID_MP3 ||
              st->codec->codec_id == CODEC_ID_AAC)) {
      *q++ = 0xc0;
+ } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
+            st->codec->codec_id == CODEC_ID_AC3 &&
+            ts->m2ts_mode) {
+     /* For AC3 Audio on Blu-ray value will be 0xfd */
+     *q++ = 0xfd;
  } else {

This would make the diff smaller and easier to read.

Please do not top-post on this mailing list.

Carl Eugen



More information about the ffmpeg-devel mailing list