Ticket #1755: 0001-PATCH-Use-sample-size-in-case-incorrect-timestamps-f.patch

File 0001-PATCH-Use-sample-size-in-case-incorrect-timestamps-f.patch, 1.4 KB (added by Heesuk Jung, 4 years ago)

update patch considering additional problem case

  • libavformat/avidec.c

    From b7245ddaea8f9389f9bea301e0778494f0085bf9 Mon Sep 17 00:00:00 2001
    From: Heesuk Jung <heesuk.jung@lge.com>
    Date: Fri, 12 Oct 2012 13:47:22 +0900
    Subject: [PATCH] [PATCH] Use sample size in case incorrect timestamps for aac in AVI (Ticket #1755)
    
    In some case for aac in AVI, avidec extracts wrong PTS value.
    (www.ffmpeg.org/trac/ffmpeg/ticket/1755)
    
    I found additional case(ss=4096) and add condition.
    
    Problematic file link : https://docs.google.com/open?id=0B6r7ZfWFIypCOTdZQUtGVEdJUUE
    ---
     libavformat/avidec.c |    1 +
     1 files changed, 1 insertions(+), 0 deletions(-)
    
    diff --git a/libavformat/avidec.c b/libavformat/avidec.c
    index e383245..835c36d 100644
    a b static int avi_read_header(AVFormatContext *s) 
    682682                        ast->dshow_block_align = 0; 
    683683                    } 
    684684                    if(st->codec->codec_id == AV_CODEC_ID_AAC && ast->dshow_block_align == 1024 && ast->sample_size == 1024 || 
     685                       st->codec->codec_id == AV_CODEC_ID_AAC && ast->dshow_block_align == 4096 && ast->sample_size == 4096 || 
    685686                       st->codec->codec_id == AV_CODEC_ID_MP3 && ast->dshow_block_align == 1152 && ast->sample_size == 1152) { 
    686687                        av_log(s, AV_LOG_DEBUG, "overriding sample_size\n"); 
    687688                        ast->sample_size = 0;