On Thu, Jan 28, 2016 at 1:15 PM, Kieran Kunhya <kieran...@googlemail.com> wrote: > On Thu, 28 Jan 2016 at 16:26 Vittorio Giovara <vittorio.giov...@gmail.com> > wrote: > >> On Mon, Jan 25, 2016 at 6:15 PM, Kieran Kunhya <kieran...@googlemail.com> >> wrote: >> >>> +{ >> >>> + CFHDContext *s = avctx->priv_data; >> >>> + >> >>> + avctx->pix_fmt = AV_PIX_FMT_YUV422P10; >> >> >> >> if the decoder supports multiple pixel formats it's better not to >> >> initialize the pixel format here, and wait until decode(). Otherwise >> >> it's going to cause a "parameters changed" warning and reinit any >> >> previous filter chain. >> > >> > There are some samples which don't have a pixel format flagged and are >> > implicitly AV_PIX_FMT_YUV422P10. >> >> I still think this should be put off until you get to decoding a >> frame: having a filterchain reinitialization can be disastrous under >> certain conditions. >> >> > Not my problem to handle issues with applications.
sure, but to give another example if you ffprobe/avprobe a chfd sample it will always report yuv422p10, while sometimes it's not. In cases like this one I think it's better to have it decode one frame to get the correct pixel format (until some proper parser apis replace this way). >> >>> + >> >>> +end: >> >>> + if (ret < 0) >> >>> + return ret; >> >>> + >> >>> + *got_frame = 1; >> >>> + return avpkt->size; >> >> >> >> avpkt->size - bytestream2_get_bytes_left(&gb) no? >> > >> > Guaranteed to read all tags. >> >> if all bytes have been read return 0 then >> >> > eh? sorry, never mind, I misread parts of the doc -- Vittorio _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel