[FFmpeg-devel] [PATCH] h264: Return the correct number of bytes for mid strea, extradata.

Nicolas George nicolas.george at normalesup.org
Sun Jan 29 21:29:02 CET 2012


Le decadi 10 pluviôse, an CCXX, Michael Niedermayer a écrit :
> Fixes the hang with Ticket952

It fixes the hang, but the file itself still does not play.

Truncating packet of size 10980 to 8667
[flv @ 0x1d1b4e0] decoding for stream 0 failed
[flv @ 0x1d1b4e0] Could not find codec parameters (Video: h264)
Input #0, flv, from '/tmp/black_rock_shooter_teaser-hq-truncated.flv':
  Metadata:
    audiochannels   : 2
    videoframerate  : 30
    aacaot          : 2
    avclevel        : 31
    avcprofile      : 100
    frameWidth      : 640
    frameHeight     : 360
    displayWidth    : 640
    displayHeight   : 360
    moovposition    : 40
  Duration: 00:00:35.46, start: 0.000000, bitrate: 236 kb/s
    Stream #0:0: Video: h264, 29.97 tbr, 1k tbn, 2k tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, s16
Output #0, sdl, to '':
  Metadata:
    audiochannels   : 2
    videoframerate  : 30
    aacaot          : 2
    avclevel        : 31
    avcprofile      : 100
    frameWidth      : 640
    frameHeight     : 360
    displayWidth    : 640
    displayHeight   : 360
    moovposition    : 40
Output file #0 does not contain any stream

Furthermore, returning non-0 when ff_h264_decode_extradata seems to be
incompatible with that piece of code:

    if(avctx->extradata_size > 0 && avctx->extradata &&
        ff_h264_decode_extradata(h, avctx->extradata, avctx->extradata_size))
        return -1;

Adding the obvious "< 0" there makes the file play with the broken first
frames, which is better than nothing but still not perfect.

Thanks for your time.

Regards,

-- 
  Nicolas George
-------------- 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/20120129/d72f1bc7/attachment.asc>


More information about the ffmpeg-devel mailing list