[Libav-user] Byte-Order and AVCodecContext SPS/PPS configuration

Christian Brümmer christian.bruemmer at gmx.de
Tue Jun 19 16:16:52 CEST 2012


Hi,

i m struggeling while sending the AVCodecContext.extradata (as it is) 
via Network through a Android-Device which is parsing those informations 
to the ffmpeg (NDK) decoder. If i use the extradata on the same PC twice 
for encoding and decoding it works very well but if i try to send it 
over network to the phone i get "non existing pps 0 referenced" which 
means wrong pps informations.

I know the Endianness of the Windows machine is Little-Endian - the 
network byteorder is Big-Endian - and the Android-Device is 
Little-Endian (Java: ByteOrder.nativeOrder() -> Little-Endian). If i try 
to transfer Integervalues as Bytestream i have to reorder to 
Little-Endian to get the right representation on the Android-Device.

I dont know if the Byte-Array containing the SPS and PPS informations 
(uint8_*) has to be swapped in any way? In case of a bytestream which 
gets encoded by ffmpeg i thoughts its nothing i have to worry about. Of 
course it could be a problem with the parsing/communication - but i want 
to get sure to be right.

Best regards,
Christian


More information about the Libav-user mailing list