On 25/08/14 03:03, Vittorio Giovara wrote:
> On Fri, Aug 8, 2014 at 7:07 AM, Luca Barbato <lu_z...@gentoo.org> wrote:
>> It hints that the content is H264 according to HD-DVD.
>> ---
>>
>>  libavformat/mpeg.h    |  1 +
>>  libavformat/mpegenc.c | 13 +++++++++----
>>  2 files changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/libavformat/mpeg.h b/libavformat/mpeg.h
>> index 629f2f0..d0b36ee 100644
>> --- a/libavformat/mpeg.h
>> +++ b/libavformat/mpeg.h
>> @@ -40,6 +40,7 @@
>>
>>  #define AUDIO_ID 0xc0
>>  #define VIDEO_ID 0xe0
>> +#define H264_ID  0xe2
>>  #define AC3_ID   0x80
>>  #define DTS_ID   0x8a
>>  #define LPCM_ID  0xa0
>> diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
>> index d60214f..aa0eaf8 100644
>> --- a/libavformat/mpegenc.c
>> +++ b/libavformat/mpegenc.c
>> @@ -296,7 +296,7 @@ static int get_system_header_size(AVFormatContext *ctx)
>>  static av_cold int mpeg_mux_init(AVFormatContext *ctx)
>>  {
>>      MpegMuxContext *s = ctx->priv_data;
>> -    int bitrate, i, mpa_id, mpv_id, mps_id, ac3_id, dts_id, lpcm_id, j;
>> +    int bitrate, i, mpa_id, mpv_id, h264_id, mps_id, ac3_id, dts_id, 
>> lpcm_id, j;
>>      AVStream *st;
>>      StreamInfo *stream;
>>      int audio_bitrate;
>> @@ -332,6 +332,7 @@ static av_cold int mpeg_mux_init(AVFormatContext *ctx)
>>      ac3_id  = AC3_ID;
>>      dts_id  = DTS_ID;
>>      mpv_id  = VIDEO_ID;
>> +    h264_id = H264_ID;
>>      mps_id  = SUB_ID;
>>      lpcm_id = LPCM_ID;
> 
> It looks ok-ish if tested. Is it normal that the ID is ordered by
> value rather than by name?

The code was like that from start. Tested and generating files certain
players can demux instead of ignoring its content.

lu

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to