Hello,

Consider an MPEG Audio Layer II elementary stream (test.mp2)

libavformat returns codec_id = CODEC_ID_MP3 not CODEC_ID_MP2

AFAIU, the layer is stored in sub_id

There is a comment :
CODEC_ID_MP3 ///< preferred ID for decoding MPEG audio layer 1, 2 or 3

Shouldn't ff_mpa_decode_header set codec_id to CODEC_ID_MP2 when dealing 
with a layer II ES ?

http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/mpegaudio__parser_8c-source.html#l00047

Something along the lines of

$ svn diff
Index: mpegaudio_parser.c
===================================================================
--- mpegaudio_parser.c  (revision 16054)
+++ mpegaudio_parser.c  (working copy)
@@ -62,6 +62,7 @@
          break;
      case 2:
          avctx->frame_size = 1152;
+        avctx->codec_id = CODEC_ID_MP2;
          break;
      default:
      case 3:

-- 
Regards.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to