mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 20:19:55 +00:00
avcodec/options-test: Check avcodec_open2() return value
Fixes: CID1361937 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
4b38df82c2
commit
699201ac0e
@ -152,8 +152,13 @@ static void test_copy(const AVCodec *c1, const AVCodec *c2)
|
||||
test_copy_print_codec(ctx1);
|
||||
test_copy_print_codec(ctx2);
|
||||
if (ctx1->codec) {
|
||||
int ret;
|
||||
printf("opened:\n");
|
||||
avcodec_open2(ctx1, ctx1->codec, NULL);
|
||||
ret = avcodec_open2(ctx1, ctx1->codec, NULL);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "avcodec_open2 failed\n");
|
||||
exit(1);
|
||||
}
|
||||
if (ctx2->codec && ctx2->codec->priv_class && ctx2->codec->priv_data_size) {
|
||||
av_opt_set(ctx2->priv_data, "num", "667", 0);
|
||||
av_opt_set(ctx2->priv_data, "str", "i'm dest value before copy", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user