[FFmpeg-devel] [PATCH] AVCHD/H.264 parser: determination of frame type, question about timestamps

Michael Niedermayer michaelni
Fri Jan 23 12:52:19 CET 2009


On Mon, Jan 19, 2009 at 09:22:27PM +0100, Ivan Schreter wrote:
[...]

> +    s->pict_type= FF_I_TYPE;

useless?


> +    while(buf<buf_end){
> +        buf= ff_find_start_code(buf, buf_end, &state);
> +        init_get_bits(&h->s.gb, buf, 8*(buf_end - buf));
> +        switch(state & 0x1F){
> +        case NAL_SPS:
> +            ff_h264_decode_seq_parameter_set(h);
> +            break;
> +        case NAL_PPS:
> +            ff_h264_decode_picture_parameter_set(h, h->s.gb.size_in_bits);
> +            break;
> +        case NAL_IDR_SLICE:
> +        case NAL_SLICE:
> +            get_ue_golomb(&h->s.gb);
> +            s->pict_type= golomb_to_pict_type[get_ue_golomb(&h->s.gb) % 5];

IIRC that should be get_ue_golomb_31() also its missing some check against
negative values


[...]

> Index: libavformat/mpegts.c

doesnt belong in this patch

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090123/65cb92eb/attachment.pgp>



More information about the ffmpeg-devel mailing list