[FFmpeg-devel] [PATCH 2/2] rtpdec_h264: Pass NAL type 0 through

Luca Barbato lu_zero
Mon Dec 6 13:29:12 CET 2010


On 12/6/10 12:55 PM, Martin Storsjo wrote:
> According to the spec, this type shouldn't ever be used. Nevertheless,
> passing it through enables decoding streams which otherwise aren't
> decodeable.

Ok, maybe we might spam a bit on debug mode when that happens.

Is the producer/server known?

lu

> ---
>   libavformat/rtpdec_h264.c |    5 +----
>   1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
> index 29705a6..75db14c 100644
> --- a/libavformat/rtpdec_h264.c
> +++ b/libavformat/rtpdec_h264.c
> @@ -187,10 +187,7 @@ static int h264_handle_packet(AVFormatContext *ctx,
>       if (type>= 1&&  type<= 23)
>           type = 1;              // simplify the case. (these are all the nal types used internally by the h264 codec)
>       switch (type) {
> -    case 0:                    // undefined;
> -        result= -1;
> -        break;
> -
> +    case 0:                    // undefined, but pass them through
>       case 1:
>           av_new_packet(pkt, len+sizeof(start_sequence));
>           memcpy(pkt->data, start_sequence, sizeof(start_sequence));




More information about the ffmpeg-devel mailing list