From: =?gb18030?B?zP2jrMzssd+1xLjo?= <76138202@qq.com> To: =?gb18030?B?ZmZtcGVnLWRldmVs?= <ffmpeg-devel@ffmpeg.org> Subject: [FFmpeg-devel] vcodec_open2 error: Internal bug, should not have happened Date: Mon, 10 Jul 2023 15:21:17 +0800 Message-ID: <tencent_B19F12D54144EC802B9D3782F9EF55F89D0A@qq.com> (raw) I am trying to implement the OpenMax IL Video Decoder on ffmpeg. But I meet some problems. When I use the codec with ffmpeg on Chrome by force, it raised a error of bug ffmpeg_video_decoder.cc(491)] avcodec_open2 error: Internal bug, should not have happened I 'm not familiar with the version of ffmpeg in the last serveral years. My codec can run success when using ./ffmpeg -c:v h264_omxcodec -i test1.mp4 output_video.mp4 and I haven't find out how to enable logging of ffmpeg on Chrome(I don't know why av_log_set_callback() is useless when I used it), so Is there anyone can give me some advices? Thx a lot. The FFCodec is used as following: #define OFFSET(x) offsetof(OMXCodecDecoderContext, x) #define VDE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM static const AVCodecHWConfigInternal *const omx_hw_configs[] = { &(const AVCodecHWConfigInternal) { .public = { .pix_fmt = AV_PIX_FMT_NV12, .methods = AV_CODEC_HW_CONFIG_METHOD_AD_HOC | AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX, .device_type = AV_HWDEVICE_TYPE_OMX, }, .hwaccel = NULL, }, NULL }; static const AVOption ff_omxcodec_vdec_options[] = { { "delay_flush", "Delay flush until hw output buffers are returned to the decoder", OFFSET(delay_flush), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, VD }, { NULL } }; #define DECLARE_OMX_VCLASS(short_name) \ static const AVClass ff_##short_name##_omxcodec_dec_class = { \ .class_name = #short_name "_libomxh264", \ .item_name = av_default_item_name, \ .option = ff_omxcodec_vdec_options, \ .version = LIBAVUTIL_VERSION_INT, \ }; #define DECLARE_OMX_VDEC(short_name, full_name, codec_id, bsf) \ DECLARE_OMX_VCLASS(short_name) \ const FFCodec ff_ ## short_name ## _omx_decoder = { \ .p.name = #short_name "_omxcodec", \ CODEC_LONG_NAME(full_name " OpenMAX IL decoder"), \ .p.type = AVMEDIA_TYPE_VIDEO, \ .p.id = codec_id, \ .p.priv_class = &ff_##short_name##_omxcodec_dec_class, \ .priv_data_size = sizeof(OMXCodecDecoderContext), \ .init = omx_decode_init, \ FF_CODEC_DECODE_CB(omx_decode_frame), \ .close = omx_decode_end, \ .flush = omx_decode_flush, \ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING , \ .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE | \ FF_CODEC_CAP_SETS_PKT_DTS, \ .bsfs = bsf, \ .p.wrapper_name = "omxcodec", \ }; DECLARE_OMX_VDEC(h264, "H.264", AV_CODEC_ID_H264, "h264_mp4toannexb") DECLARE_OMX_VDEC(hevc, "H.265", AV_CODEC_ID_HEVC, "hevc_mp4toannexb") DECLARE_OMX_VDEC(mpeg4, "MPEG-4", AV_CODEC_ID_MPEG4, NULL) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
reply other threads:[~2023-07-10 7:21 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=tencent_B19F12D54144EC802B9D3782F9EF55F89D0A@qq.com \ --to=76138202@qq.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git