On Sat, Jun 27, 2020 at 5:45 PM Nicolas George <geo...@nsup.org> wrote: > > Gautam Ramakrishnan (12020-06-25): > > The type conversions confused me a bit. I will remove them. > > Please be sure you have the basics about C type promotions right. C will > automatically convert types whenever necessary and notify when one such > conversion may cause unexpected results. Adding a cast will force a > conversion, possibly a wrong conversion followed by the right automatic > conversion. It will also silence possible warnings. > > The rule of thumb is that a C program should contain as little casts as > possible, usually to silence warnings in tricky pointer arithmetic where > the developer has checked carefully. > > > I guess changing from bytestream2_get_byteu to bytestrea2_get_byte should > > do the trick here? > > What? You use the u variant if you are sure there is enough data > available, it has nothing to do with a cast. > > > So you mean to say no need to store height and width in the > > PGX context? > > Exactly. Just define all the variables decoded from the header in > decode_frame(). If there are too many, you can group them in another > structure. This will require me to remove the decode_header() function and add the logic directly into the decode_frame function. If that is fine, I shall remove PGX context structrure. > > Regards, > > -- > Nicolas George > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
-- ------------- Gautam | _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".