Re: [FFmpeg-devel] MpegEncContext->class is never initialized

2025-03-04 Thread Andreas Rheinhardt
John Dorian: > Yes, I have a custom log callback. I have multiple files open and I'd like > to associate logged errors with the correct file, which I am doing through > the objects that have an "opaque" member (not all, but most do). I don't > think this is any abuse of the API as it does state tha

Re: [FFmpeg-devel] MpegEncContext->class is never initialized

2025-03-04 Thread John Dorian
Yes, I have a custom log callback. I have multiple files open and I'd like to associate logged errors with the correct file, which I am doing through the objects that have an "opaque" member (not all, but most do). I don't think this is any abuse of the API as it does state that the first member of

Re: [FFmpeg-devel] MpegEncContext->class is never initialized

2025-03-04 Thread Andreas Rheinhardt
John Dorian: > I discovered a crash here if log handler function tries to get the class > name from "s" > > mpeg12dec.c: > if (get_bits_left(&s->gb) < 0) { > av_log(s, AV_LOG_ERROR, "overread %d\n", -get_bits_left(&s->gb)); > return AVERROR_INVALIDDATA; > } > > And it seems

[FFmpeg-devel] MpegEncContext->class is never initialized

2025-03-04 Thread John Dorian
I discovered a crash here if log handler function tries to get the class name from "s" mpeg12dec.c: if (get_bits_left(&s->gb) < 0) { av_log(s, AV_LOG_ERROR, "overread %d\n", -get_bits_left(&s->gb)); return AVERROR_INVALIDDATA; } And it seems to be because MpegEncContext->cl

Re: [FFmpeg-devel] MpegEncContext->class is never initialized

2025-03-04 Thread Andreas Rheinhardt
John Dorian: > I discovered a crash here if log handler function tries to get the class > name from "s" > > mpeg12dec.c: > if (get_bits_left(&s->gb) < 0) { > av_log(s, AV_LOG_ERROR, "overread %d\n", -get_bits_left(&s->gb)); > return AVERROR_INVALIDDATA; > } > > And it seems