comparison libmpdemux/demux_lavf.c @ 34526:506577fd3e07

Replace deprecated av_set_int.
author reimar
date Sat, 28 Jan 2012 10:50:52 +0000
parents 7e1d9cf6a0db
children 11c8d827b55e
comparison
equal deleted inserted replaced
34525:7e1d9cf6a0db 34526:506577fd3e07
476 } 476 }
477 } 477 }
478 478
479 static demuxer_t* demux_open_lavf(demuxer_t *demuxer){ 479 static demuxer_t* demux_open_lavf(demuxer_t *demuxer){
480 AVFormatContext *avfc; 480 AVFormatContext *avfc;
481 const AVOption *opt;
482 AVDictionaryEntry *t = NULL; 481 AVDictionaryEntry *t = NULL;
483 lavf_priv_t *priv= demuxer->priv; 482 lavf_priv_t *priv= demuxer->priv;
484 int i; 483 int i;
485 char mp_filename[256]="mp:"; 484 char mp_filename[256]="mp:";
486 485
494 avfc->flags |= AVFMT_FLAG_GENPTS; 493 avfc->flags |= AVFMT_FLAG_GENPTS;
495 if (index_mode == 0) 494 if (index_mode == 0)
496 avfc->flags |= AVFMT_FLAG_IGNIDX; 495 avfc->flags |= AVFMT_FLAG_IGNIDX;
497 496
498 if(opt_probesize) { 497 if(opt_probesize) {
499 opt = av_set_int(avfc, "probesize", opt_probesize); 498 if (av_opt_set_int(avfc, "probesize", opt_probesize, 0) < 0)
500 if(!opt) mp_msg(MSGT_HEADER,MSGL_ERR, "demux_lavf, couldn't set option probesize to %u\n", opt_probesize); 499 mp_msg(MSGT_HEADER,MSGL_ERR, "demux_lavf, couldn't set option probesize to %u\n", opt_probesize);
501 } 500 }
502 if(opt_analyzeduration) { 501 if(opt_analyzeduration) {
503 opt = av_set_int(avfc, "analyzeduration", opt_analyzeduration * AV_TIME_BASE); 502 if (av_opt_set_int(avfc, "analyzeduration", opt_analyzeduration * AV_TIME_BASE, 0) < 0)
504 if(!opt) mp_msg(MSGT_HEADER,MSGL_ERR, "demux_lavf, couldn't set option analyzeduration to %u\n", opt_analyzeduration); 503 mp_msg(MSGT_HEADER,MSGL_ERR, "demux_lavf, couldn't set option analyzeduration to %u\n", opt_analyzeduration);
505 } 504 }
506 505
507 if(opt_avopt){ 506 if(opt_avopt){
508 if(parse_avopts(avfc, opt_avopt) < 0){ 507 if(parse_avopts(avfc, opt_avopt) < 0){
509 mp_msg(MSGT_HEADER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", opt_avopt); 508 mp_msg(MSGT_HEADER,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", opt_avopt);