On Wed, 13 Feb 2013 10:39:44 +0100, kavi0 <[email protected]> wrote: > I'm working on an application that receives h.264 frames from camera, decodes > them and displays them on the screen. > > I have met a problem which occurs when code (in file h264.c): > case NAL_SLICE: > init_get_bits(&hx->s.gb, ptr, bit_length); > hx->intra_gb_ptr = > hx->inter_gb_ptr = &hx->s.gb; > hx->s.data_partitioning = 0; > if ((err = decode_slice_header(hx, h))) > break; > is reached with bit_length set to 0. Function init_get_bits() sets > hx->s.gb->buffer to NULL, then hx is passed to function decode_slice_heder() > which calls get_ue_golomb(&s.gb). The result is access violation error. > bit_length=0 is a result of calling ff_h264_decode_nal(). > Application works without any crash with added error checking: > if (init_get_bits(&hx->s.gb, ptr, bit_length) == AVERROR_INVALIDDATA) { > buf_index = -1; > goto end; > } > Is it a bug or maybe it is a problem with h.264 stream? >
Crashing on any kind of input is most certainly a bug. Could you share the sample that makes it crash? -- Anton Khirnov _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
