| 1500 | */ |
| 1501 | |
| 1502 | static int apply_options(hb_job_t *job, AVCodecContext *context, AVDictionary **av_opts, hb_dict_t *lavc_opts) |
| 1503 | { |
| 1504 | /* iterate through lavc_opts and have avutil parse the options for us */ |
| 1505 | hb_dict_iter_t iter; |
| 1506 | for (iter = hb_dict_iter_init(lavc_opts); |
| 1507 | iter != HB_DICT_ITER_DONE; |
| 1508 | iter = hb_dict_iter_next(lavc_opts, iter)) |
| 1509 | { |
| 1510 | const char *key = hb_dict_iter_key(iter); |
| 1511 | hb_value_t *value = hb_dict_iter_value(iter); |
| 1512 | char *str = hb_value_get_string_xform(value); |
| 1513 | |
| 1514 | /* Here's where the strings are passed to avutil for parsing. */ |
| 1515 | av_dict_set(av_opts, key, str, 0); |
| 1516 | free(str); |
| 1517 | } |
| 1518 | |
| 1519 | return 0; |
| 1520 | } |
| 1521 | |
| 1522 | static int apply_encoder_options(hb_job_t *job, AVCodecContext *context, AVDictionary **av_opts) |
| 1523 | { |
no test coverage detected