int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
AVCodec *p = NULL;
AVOutputFormat *oformat = NULL;
+ AVInputFormat *iformat = NULL;
while ((p = av_codec_next(p))) {
AVClass *c = p->priv_class;
}
if (oformat)
goto out;
+ while ((iformat = av_iformat_next(iformat))) {
+ const AVClass *c = iformat->priv_class;
+ if (c && av_find_opt(&c, opt, NULL, 0, 0))
+ break;
+ }
+ if (iformat)
+ goto out;
for(type=0; *avcodec_opts && type<AVMEDIA_TYPE_NB && ret>= 0; type++){
const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
AVFormatContext *avctx = ctx;
if (avctx->oformat && avctx->oformat->priv_class) {
priv_ctx = avctx->priv_data;
+ } else if (avctx->iformat && avctx->iformat->priv_class) {
+ priv_ctx = avctx->priv_data;
}
}
memcpy(frame->data, picref->data, sizeof(frame->data));
memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize));
+ frame->pkt_pos = picref->pos;
frame->interlaced_frame = picref->video->interlaced;
frame->top_field_first = picref->video->top_field_first;
frame->key_frame = picref->video->key_frame;
frame->pict_type = picref->video->pict_type;
+ frame->sample_aspect_ratio = picref->video->sample_aspect_ratio;
return 1;
}