[vlc-devel] Re: Problems with using FFMPEG's "h264.c" to decode H264/RTP streams

Ross Finlayson finlayson at live.com
Wed Jul 20 02:37:10 CEST 2005


At 08:49 AM 7/19/05, you wrote:
>  I have commited a patch to livedotcom.cpp that allow decoding
>h264 over RTP.
>
>(The trick about decoding nal alone is to set
>  es_format_t.b_packetized to false to force VLC to gather the
>  frame before giving it to ffmpeg)

Laurent,

Many thanks for taking care of this.

However, are you sure that this works correctly on H.264/RTP streams?  I 
was not able to get it working with FFMPEG (v20050630).

In particular, I suspect that the following lines (at line 84 of 
livedotcom.cpp)
         p_block->p_buffer[0] = 0x00;
         p_block->p_buffer[1] = 0x00;
         p_block->p_buffer[2] = 0x00;
         p_block->p_buffer[3] = 0x01;
should be changed to
         p_block->p_buffer[0] = i_size>>24;
         p_block->p_buffer[1] = i_size>>16;
         p_block->p_buffer[2] = i_size>>8;
         p_block->p_buffer[3] = i_size;
i.e., prepending each NAL unit with its (big-endian) size, rather than 
0x00000001.  And similarly for the handling of 'extra data'.

         Ross.

ps. BTW, recent versions of the LIVE.COM libraries contain a function 
"parseSPropParameterSets()" that already does much of the what your new 
"parseH264ConfigStr()" function does.  See 
"live/liveMedia/include/H264VideoRTPSource.hh" and 
"live/liveMedia/H264VideoRTPSource.cpp".


-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list