[FFmpeg-devel] [PATCH]Support ac-3 in sfd
Michael Niedermayer
michaelni at gmx.at
Sun Dec 1 03:14:17 CET 2013
On Sat, Nov 30, 2013 at 02:14:47AM +0100, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch fixes ticket #3184 for me.
>
> Please comment, Carl Eugen
> mpeg.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
> 61a6f95d5a1e9c201dbfe768d97389f470b59426 patchsfdac3.diff
> diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
> index 1ea58d5..5d37167 100644
> --- a/libavformat/mpeg.c
> +++ b/libavformat/mpeg.c
> @@ -521,7 +521,17 @@ static int mpegps_read_packet(AVFormatContext *s,
> codec_id = AV_CODEC_ID_DVD_NAV;
> } else if (startcode >= 0x1c0 && startcode <= 0x1df) {
> type = AVMEDIA_TYPE_AUDIO;
> - codec_id = m->sofdec > 0 ? AV_CODEC_ID_ADPCM_ADX : AV_CODEC_ID_MP2;
> + if (m->sofdec) {
> + switch (startcode) {
> + case 0x1c1:
> + codec_id = AV_CODEC_ID_AC3;
> + break;
> + default:
> + codec_id = AV_CODEC_ID_ADPCM_ADX;
> + }
i doubt a bit that this is the correct way to identify the codec but
without some spec (is there one ?) it could as well be correct, so
no objections
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- 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/20131201/dcf65cd9/attachment.asc>
More information about the ffmpeg-devel
mailing list