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

Michael Niedermayer michaelni at gmx.at
Thu Aug 2 14:12:29 CEST 2012


On Thu, Aug 02, 2012 at 12:09:32PM +0100, kifayat ullah wrote:
> Hi,
> Tabs are corrected in the attached patch.
> also this patch is for changing the behaviour of ac3 audio in m2ts for blu-ray players.
> Actually some of Blu-ray players looking for these extended flags value to play AC3 audio.

> So conclusion is this PATCH is only to change the behaviour of AC3 in M2TS for Blu-ray players and will not effect any other.
> Regards

[...]
> @@ -916,11 +915,15 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
>                      *q++ = 0xfd;
>                  } else
>                      *q++ = 0xe0;
> -            } 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 &&
> +                                    st->codec->codec_id == CODEC_ID_AC3){ /* For AC3 Audio on Blu-ray value will be 0xfd*/
> +                                *q++ = 0xfd;
> +                        }
>              } else {
>                  *q++ = 0xbd;

before this patch an audio codec not MP2/MP3/AAC/(AC3&&m2ts_mode) will
reach the else and write 0xBD after the patch such audio codec will not
Obviously this change is unintended

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120802/dcac511e/attachment.asc>


More information about the ffmpeg-devel mailing list