This patch set fixes a problem that occurs with h263 and h261 decoding when not using libavformat for demux. Initialization order is incorrect and results in incorrect decoding.
The reason decoding works when libavformat is used for demux is AVCodecContext widht/height gets initialized during avformat_find_stream_info. These dimensions are then used for initialization of MpegEncContext when the codec is reopened using the same or copied AVCodecContext in ff_h263_decode_init. In order to solve this initialization order problem, I had to first solve a chicken & egg problem. mpeg4_decode_picutre_header requires idct_permutation which is initialized in ff_MPV_common_init. But ff_MPV_common_init requires frame dimensions which are initialized in mpeg4_decode_picture_header. To solve this, I first split out idct initialization, then I move the call to ff_MPV_common_init below the call to *_decode_picture_header. I have verified that this passes fate and oracle. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
