comparison libmpcodecs/ve_lavc.c @ 36150:98eb9f802619

Fix incorrect error printing code. The code worked during testing by pure dumb luck, the right pointer ended up just at the right place by chance.
author reimar
date Tue, 07 May 2013 20:39:15 +0000
parents 9b4ba0fb999b
children 57a21cd090a1
comparison
equal deleted inserted replaced
36149:f69d9caa3d84 36150:98eb9f802619
665 if (avcodec_open2(lavc_venc_context, vf->priv->codec, &opts) != 0) { 665 if (avcodec_open2(lavc_venc_context, vf->priv->codec, &opts) != 0) {
666 mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantOpenCodec); 666 mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantOpenCodec);
667 return 0; 667 return 0;
668 } 668 }
669 if (av_dict_count(opts)) { 669 if (av_dict_count(opts)) {
670 AVDictionaryEntry *e = av_dict_get(opts, "", NULL, 0); 670 AVDictionaryEntry *e = NULL;
671 mp_msg(MSGT_MENCODER,MSGL_ERR,"Unknown option %s\n"); 671 while ((e = av_dict_get(opts, "", e, AV_DICT_IGNORE_SUFFIX)))
672 mp_msg(MSGT_MENCODER,MSGL_ERR,"Unknown option %s\n", e->key);
672 return 0; 673 return 0;
673 } 674 }
674 av_dict_free(&opts); 675 av_dict_free(&opts);
675 676
676 /* free second pass buffer, its not needed anymore */ 677 /* free second pass buffer, its not needed anymore */