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

kifayat ullah kifayat.ullah at yahoo.com
Thu Aug 2 16:39:14 CEST 2012


Hello,
Please find attached corrected patch,
Please do forget my previouse email,
regards
Kifayat



________________________________
 From: Michael Niedermayer <michaelni at gmx.at>
To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>; kifayat ullah <kifayat.ullah at yahoo.com> 
Sent: Thursday, 2 August 2012, 13:12
Subject: Re: [FFmpeg-devel] [PATCH] AC3 audio issue in m2ts for Blu-ray Players.
 
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.

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpegtsenc1.patch
Type: application/octet-stream
Size: 2583 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120802/d56d8932/attachment.obj>


More information about the ffmpeg-devel mailing list