52 #include "libavutil/ffversion.h" 70 return FFMPEG_CONFIGURATION;
75 #define LICENSE_PREFIX "libavformat license: " 89 #define RELATIVE_TS_BASE (INT64_MAX - (1LL<<48)) 107 timestamp < st->internal->pts_wrap_reference)
116 #if FF_API_FORMAT_GET_SET 118 #if FF_API_LAVF_FFSERVER 130 #if FF_API_OLD_OPEN_CALLBACKS 170 if ( (src-> codec_whitelist && !dst-> codec_whitelist)
171 || (src-> format_whitelist && !dst-> format_whitelist)
182 #if FF_API_LAVF_AVCTX 184 if (st->codec->codec)
185 return st->codec->codec;
208 #if CONFIG_H264_DECODER 223 if (probe_codec->
id == codec->
id &&
234 #if FF_API_FORMAT_GET_SET 242 #define SANE_CHUNK_SIZE (50000000) 249 if (remaining < size) {
252 s->
maxsize = newsize - !newsize;
259 if (s->
maxsize >= 0 && remaining < size && size > 1) {
261 "Truncating packet of size %d to %"PRId64
"\n",
262 size, remaining + !remaining);
263 size = remaining + !remaining;
273 int orig_size = pkt->
size;
277 int prev_size = pkt->
size;
295 if (ret != read_size) {
307 return pkt->
size > orig_size ? pkt->
size - orig_size :
ret;
337 static const struct {
365 "Probe with size=%d, packets=%d detected %s with score=%d\n",
368 for (i = 0; fmt_id_type[
i].name; i++) {
369 if (!strcmp(fmt->
name, fmt_id_type[i].name)) {
379 #if FF_API_LAVF_AVCTX 430 "will be ignored with AVFMT_NOFILE format.\n");
455 "Attached picture on stream %d has invalid size, " 490 #if FF_API_LAVF_AVCTX 516 av_log(
NULL,
AV_LOG_ERROR,
"Input context has not been properly allocated by avformat_alloc_context() and is not NULL either\n");
536 #if FF_API_FORMAT_FILENAME 538 av_strlcpy(s->filename, filename ? filename :
"",
sizeof(s->filename));
541 if ((ret =
init_input(s, filename, &tmp)) < 0)
610 if (id3v2_extra_meta) {
693 "Failed to reallocate probe buffer for stream %d\n",
706 "nothing to probe for stream %d\n", st->
index);
734 int i, pts_wrap_behavior;
735 int64_t pts_wrap_reference;
753 if (!first_program) {
780 program = first_program;
832 if (!pktl || ret ==
AVERROR(EAGAIN))
852 "Packet corrupt (stream = %d, dts = %s)",
863 "Invalid stream index.\n");
930 #if FF_API_LAVF_AVCTX 947 }
else if (codec_framerate.
den * 1000LL > codec_framerate.
num) {
976 if (frame_size <= 0 || sample_rate <= 0)
1002 #if CONFIG_H264_DECODER 1033 int64_t best_score = INT64_MAX;
1034 for (i = 0; i<delay; i++) {
1037 if (score < best_score) {
1039 dts = pts_buffer[
i];
1044 for (i = 0; i<delay; i++) {
1046 int64_t
diff =
FFABS(pts_buffer[i] - dts)
1061 dts = pts_buffer[0];
1082 for (; pkt_buffer; pkt_buffer =
get_next_pkt(s, st, pkt_buffer)) {
1087 pts_buffer[0] = pkt_buffer->
pkt.
pts;
1088 for (i = 0; i<delay && pts_buffer[i] > pts_buffer[i + 1]; i++)
1089 FFSWAP(int64_t, pts_buffer[i], pts_buffer[i + 1]);
1120 for (pktl_it = pktl; pktl_it; pktl_it =
get_next_pkt(s, st, pktl_it)) {
1124 pktl_it->
pkt.
pts += shift;
1127 pktl_it->
pkt.
dts += shift;
1150 int stream_index, int64_t
duration)
1170 av_log(s,
AV_LOG_DEBUG,
"first_dts %s not matching first dts %s (pts %s, duration %"PRId64
") in the queue\n",
1206 int64_t next_dts, int64_t next_pts)
1208 int num, den, presentation_delayed, delay,
i;
1223 "DTS %"PRIi64
" < %"PRIi64
" out of order\n",
1249 presentation_delayed = 0;
1255 presentation_delayed = 1;
1270 if (delay == 1 && pkt->
dts == pkt->
pts &&
1273 if ( strcmp(s->
iformat->
name,
"mov,mp4,m4a,3gp,3g2,mj2")
1308 presentation_delayed = 1;
1312 "IN delayed:%d pts:%s, dts:%s cur_dts:%s st:%d pc:%p duration:%"PRId64
" delay:%d onein_oneout:%d\n",
1318 if ((delay == 0 || (delay == 1 && pc)) &&
1320 if (presentation_delayed) {
1338 ((uint64_t)st->
cur_dts - (uint64_t)next_dts + 1) <= 2 &&
1339 next_dts != next_pts &&
1341 pkt->
pts = next_dts;
1343 if ((uint64_t)pkt->
duration <= INT32_MAX)
1387 #if FF_API_CONVERGENCE_DURATION 1402 int stream_index,
int flush)
1410 if (size || flush) {
1417 while (size > 0 || (flush && got_output)) {
1419 int64_t next_pts = pkt->
pts;
1420 int64_t next_dts = pkt->
dts;
1423 &out_pkt.
data, &out_pkt.
size, data, size,
1430 data = len ? data + len :
data;
1433 got_output = !!out_pkt.
size;
1467 (
AVRational) { 1, st->internal->avctx->sample_rate },
1519 int ret,
i, got_packet = 0;
1548 av_log(s,
AV_LOG_DEBUG,
"Demuxer context update while decoder is open, closing and trying to re-open\n");
1565 #if FF_API_LAVF_AVCTX 1583 "Invalid timestamps stream=%d, pts=%s, dts=%s, size=%d\n",
1591 "ff_read_packet stream=%d, pts=%s, dts=%s, size=%d, duration=%"PRId64
", flags=%d\n",
1601 "%s, packets or times may be invalid.\n",
1648 int discard_padding = 0;
1653 int64_t end_sample = sample +
duration;
1655 sample < st->internal->last_discard_sample)
1664 AV_WL32(p + 4, discard_padding);
1684 memcpy(dst_data, src_sd->
data, src_sd->
size);
1698 #if FF_API_LAVF_AVCTX 1704 "read_frame_internal stream=%d, pts=%s, dts=%s, " 1705 "size=%d, duration=%"PRId64
", flags=%d\n",
1757 last_dts = pktl->
pkt.
dts;
1785 if (pktl && ret !=
AVERROR(EAGAIN)) {
1836 int best_stream = 0;
1837 int best_score = INT_MIN;
1861 if (score > best_score) {
1933 int *nb_index_entries,
1934 unsigned int *index_entries_allocated_size,
1935 int64_t
pos, int64_t timestamp,
1941 if ((
unsigned) *nb_index_entries + 1 >= UINT_MAX /
sizeof(
AVIndexEntry))
1954 index_entries_allocated_size,
1955 (*nb_index_entries + 1) *
1960 *index_entries = entries;
1966 index = (*nb_index_entries)++;
1967 ie = &entries[
index];
1968 av_assert0(index == 0 || ie[-1].timestamp < timestamp);
1970 ie = &entries[
index];
1974 memmove(entries + index + 1, entries + index,
1976 (*nb_index_entries)++;
1977 }
else if (ie->
pos == pos && distance < ie->min_distance)
1997 timestamp, size, distance, flags);
2001 int64_t wanted_timestamp,
int flags)
2010 if (b && entries[b - 1].timestamp < wanted_timestamp)
2019 if (m == b && entries[m].timestamp >= wanted_timestamp) {
2026 if (timestamp >= wanted_timestamp)
2028 if (timestamp <= wanted_timestamp)
2034 while (m >= 0 && m < nb_entries &&
2038 if (m == nb_entries)
2046 int64_t pos_delta = 0;
2055 "Protocol name not provided, cannot determine if input is local or " 2056 "a network protocol, buffers and access patterns cannot be configured " 2057 "optimally without knowing the protocol\n");
2060 if (proto && !(strcmp(proto,
"file") && strcmp(proto,
"pipe") && strcmp(proto,
"cache")))
2063 for (ist1 = 0; ist1 < s->
nb_streams; ist1++) {
2065 for (ist2 = 0; ist2 < s->
nb_streams; ist2++) {
2080 if (e2_pts < e1_pts || e2_pts - (uint64_t)e1_pts < time_tolerance)
2091 if (s->
pb->
buffer_size < pos_delta && pos_delta < (1<<24)) {
2103 if (skip < (1<<23)) {
2111 wanted_timestamp, flags);
2115 int64_t (*read_timestamp)(
struct AVFormatContext *,
int , int64_t *, int64_t ))
2117 int64_t ts = read_timestamp(s, stream_index, ppos, pos_limit);
2118 if (stream_index >= 0)
2124 int64_t target_ts,
int flags)
2128 int64_t ts_min, ts_max, ts;
2133 if (stream_index < 0)
2142 st = s->
streams[stream_index];
2150 index =
FFMAX(index, 0);
2164 av_assert0(index < st->internal->nb_index_entries);
2172 " dts_max=%s\n", pos_max, pos_limit,
av_ts2str(ts_max));
2176 pos =
ff_gen_search(s, stream_index, target_ts, pos_min, pos_max, pos_limit,
2192 int64_t (*read_timestamp)(
struct AVFormatContext *,
int , int64_t *, int64_t ))
2194 int64_t
step = 1024;
2195 int64_t limit, ts_max;
2197 int64_t pos_max = filesize - 1;
2200 pos_max =
FFMAX(0, (pos_max) - step);
2202 &pos_max, limit, read_timestamp);
2209 int64_t tmp_pos = pos_max + 1;
2211 &tmp_pos, INT64_MAX, read_timestamp);
2217 if (tmp_pos >= filesize)
2230 int64_t pos_min, int64_t pos_max, int64_t pos_limit,
2231 int64_t ts_min, int64_t ts_max,
2232 int flags, int64_t *ts_ret,
2234 int64_t *, int64_t))
2245 ts_min =
ff_read_timestamp(s, stream_index, &pos_min, INT64_MAX, read_timestamp);
2250 if (ts_min >= target_ts) {
2256 if ((ret =
ff_find_last_ts(s, stream_index, &ts_max, &pos_max, read_timestamp)) < 0)
2258 pos_limit = pos_max;
2261 if (ts_max <= target_ts) {
2269 while (pos_min < pos_limit) {
2271 "pos_min=0x%"PRIx64
" pos_max=0x%"PRIx64
" dts_min=%s dts_max=%s\n",
2275 if (no_change == 0) {
2276 int64_t approximate_keyframe_distance = pos_max - pos_limit;
2278 pos =
av_rescale(target_ts - ts_min, pos_max - pos_min,
2280 pos_min - approximate_keyframe_distance;
2281 }
else if (no_change == 1) {
2283 pos = (pos_min + pos_limit) >> 1;
2291 else if (pos > pos_limit)
2302 " target:%s limit:%"PRId64
" start:%"PRId64
" noc:%d\n",
2303 pos_min, pos, pos_max,
2305 pos_limit, start_pos, no_change);
2310 if (target_ts <= ts) {
2311 pos_limit = start_pos - 1;
2315 if (target_ts >= ts) {
2325 ts_min =
ff_read_timestamp(s, stream_index, &pos_min, INT64_MAX, read_timestamp);
2327 ts_max =
ff_read_timestamp(s, stream_index, &pos_min, INT64_MAX, read_timestamp);
2336 int64_t pos,
int flags)
2338 int64_t pos_min, pos_max;
2345 else if (pos > pos_max)
2356 int64_t timestamp,
int flags)
2363 st = s->
streams[stream_index];
2367 if (index < 0 && st->internal->nb_index_entries &&
2368 timestamp < st->internal->index_entries[0].timestamp)
2371 if (index < 0 || index == st->internal->nb_index_entries - 1) {
2389 }
while (read_status ==
AVERROR(EAGAIN));
2390 if (read_status < 0)
2398 av_log(s,
AV_LOG_ERROR,
"seek_frame_generic failed as this stream seems to contain no keyframes after the target timestamp, %d non keyframes found\n", nonkey);
2423 int64_t timestamp,
int flags)
2435 if (stream_index < 0) {
2437 if (stream_index < 0)
2440 st = s->
streams[stream_index];
2467 int64_t timestamp,
int flags)
2472 int64_t min_ts = INT64_MIN, max_ts = INT64_MAX;
2478 flags & ~AVSEEK_FLAG_BACKWARD);
2490 int64_t ts, int64_t max_ts,
int flags)
2492 if (min_ts > ts || max_ts < ts)
2494 if (stream_index < -1 || stream_index >= (
int)s->
nb_streams)
2505 if (stream_index == -1 && s->
nb_streams == 1) {
2512 time_base.
num * (int64_t)AV_TIME_BASE,
2534 if (ret<0 && ts != min_ts && max_ts != ts) {
2535 ret =
av_seek_frame(s, stream_index, dir ? max_ts : min_ts, flags | dir);
2581 int64_t
start_time, start_time1, start_time_text, end_time, end_time1, end_time_text;
2582 int64_t
duration, duration1, duration_text, filesize;
2586 start_time = INT64_MAX;
2587 start_time_text = INT64_MAX;
2588 end_time = INT64_MIN;
2589 end_time_text = INT64_MIN;
2590 duration = INT64_MIN;
2591 duration_text = INT64_MIN;
2601 start_time_text =
FFMIN(start_time_text, start_time1);
2603 start_time =
FFMIN(start_time, start_time1);
2607 if (end_time1 !=
AV_NOPTS_VALUE && (end_time1 > 0 ? start_time1 <= INT64_MAX - end_time1 : start_time1 >= INT64_MIN - end_time1)) {
2608 end_time1 += start_time1;
2610 end_time_text =
FFMAX(end_time_text, end_time1);
2612 end_time =
FFMAX(end_time, end_time1);
2625 duration_text =
FFMAX(duration_text, duration1);
2627 duration =
FFMAX(duration, duration1);
2630 if (start_time == INT64_MAX || (start_time > start_time_text && start_time - (uint64_t)start_time_text <
AV_TIME_BASE))
2631 start_time = start_time_text;
2632 else if (start_time > start_time_text)
2635 if (end_time == INT64_MIN || (end_time < end_time_text && end_time_text - (uint64_t)end_time < AV_TIME_BASE))
2636 end_time = end_time_text;
2637 else if (end_time < end_time_text)
2638 av_log(ic,
AV_LOG_VERBOSE,
"Ignoring outlier non primary stream endtime %f\n", end_time_text / (
float)AV_TIME_BASE);
2640 if (duration == INT64_MIN || (duration < duration_text && duration_text - duration < AV_TIME_BASE))
2641 duration = duration_text;
2642 else if (duration < duration_text)
2643 av_log(ic,
AV_LOG_VERBOSE,
"Ignoring outlier non primary stream duration %f\n", duration_text / (
float)AV_TIME_BASE);
2645 if (start_time != INT64_MAX) {
2647 if (end_time != INT64_MIN) {
2656 }
else if (end_time >= start_time && end_time - (uint64_t)start_time <= INT64_MAX) {
2657 duration =
FFMAX(duration, end_time - start_time);
2666 double bitrate = (double) filesize * 8.0 * AV_TIME_BASE /
2668 if (bitrate >= 0 && bitrate <= INT64_MAX)
2695 int i, show_warning = 0;
2700 int64_t bit_rate = 0;
2742 "Estimating duration from bitrate, this may be inaccurate\n");
2745 #define DURATION_MAX_READ_SIZE 250000LL 2746 #define DURATION_MAX_RETRY 6 2753 int num, den, read_size,
i,
ret;
2754 int found_duration = 0;
2768 "start time for stream %d is not set in estimate_timings_from_pts\n", i);
2777 av_log(ic,
AV_LOG_INFO,
"Skipping duration calculation in estimate_timings_from_pts\n");
2778 goto skip_duration_calc;
2786 is_end = found_duration;
2799 }
while (ret ==
AVERROR(EAGAIN));
2802 read_size += pkt->
size;
2890 return duration_name[method];
2902 file_size =
FFMAX(0, file_size);
2932 if (st->time_base.den)
2938 "format: start_time: %s duration: %s (estimate from %s) bitrate=%"PRId64
" kb/s\n",
2950 #define FAIL(errmsg) do { \ 2952 *errmsg_ptr = errmsg; \ 2958 FAIL(
"unknown codec");
2962 FAIL(
"unspecified frame size");
2965 FAIL(
"unspecified sample format");
2967 FAIL(
"unspecified sample rate");
2969 FAIL(
"unspecified number of channels");
2971 FAIL(
"no decodable DTS frames");
2975 FAIL(
"unspecified size");
2977 FAIL(
"unspecified pixel format");
2980 FAIL(
"no frame in rv30/40 and no sar");
2984 FAIL(
"unspecified size");
2999 int got_picture = 1,
ret = 0;
3003 int do_skip_frame = 0;
3024 av_dict_set(options ? options : &thread_opt,
"threads",
"1", 0);
3028 av_dict_set(options ? options : &thread_opt,
"lowres",
"0", 0);
3053 while ((pkt.
size > 0 || (!pkt.
data && got_picture)) &&
3073 &got_picture, &pkt);
3086 if (!pkt.
data && !got_picture)
3090 if (do_skip_frame) {
3112 if (tag == tags[i].tag)
3122 if (bps <= 0 || bps > 64)
3137 if (sflags & (1 << (bps - 1))) {
3181 for (i = 0; tags && tags[
i]; i++) {
3184 if (codec_tags->
id ==
id) {
3185 *tag = codec_tags->
tag;
3197 for (i = 0; tags && tags[
i]; i++) {
3212 return (ch1 > ch2) - (ch1 < ch2);
3218 int64_t max_time = 0;
3243 if (next_start > ch->
start && next_start < end)
3246 ch->
end = (end == INT64_MAX || end < ch->
start) ? ch->
start : end;
3255 return (i + 1) * 1001;
3259 return (i + 31) * 1001 * 12;
3263 return ((
const int[]) { 80, 120, 240})[i] * 1001 * 12;
3267 return ((
const int[]) { 24, 30, 60, 12, 15, 48 })[i] * 1000 * 12;
3331 && ts - (uint64_t)last < INT64_MAX) {
3345 double sdts = dts*framerate/(1001*12);
3346 for (j= 0; j<2; j++) {
3347 int64_t ticks =
llrint(sdts+j*0.5);
3348 double error= sdts - ticks + j*0.5;
3367 if (error0 > 0.04 && error1 > 0.04) {
3402 double best_error= 0.01;
3417 for (k= 0; k<2; k++) {
3422 if (error < best_error && best_error> 0.000000001) {
3431 if (num && (!ref_rate.
num || (
double)num/(12*1001) < 1.01 *
av_q2d(ref_rate)))
3553 side_data->
size = 0;
3573 memcpy(dst_data, sd_src->
data, sd_src->
size);
3590 int64_t max_stream_analyze_duration;
3591 int64_t max_subtitle_analyze_duration;
3593 int eof_reached = 0;
3596 flush_codecs = probesize > 0;
3600 max_stream_analyze_duration = max_analyze_duration;
3601 max_subtitle_analyze_duration = max_analyze_duration;
3602 if (!max_analyze_duration) {
3603 max_stream_analyze_duration =
3613 av_log(ic,
AV_LOG_DEBUG,
"Before avformat_find_stream_info() pos: %"PRId64
" bytes read:%"PRId64
" seeks:%d nb_streams:%d\n",
3631 #if FF_API_LAVF_AVCTX 3651 "%s, packets or times may be invalid.\n",
3661 goto find_stream_info_err;
3669 av_dict_set(options ? &options[i] : &thread_opt,
"threads",
"1", 0);
3673 av_dict_set(options ? &options[i] : &thread_opt,
"lowres",
"0", 0);
3680 && codec && !avctx->
codec) {
3681 if (
avcodec_open2(avctx, codec, options ? &options[i] : &thread_opt) < 0)
3683 "Failed to open codec in %s\n",__FUNCTION__);
3688 if (codec && !avctx->
codec)
3689 if (
avcodec_open2(avctx, codec, options ? &options[i] : &thread_opt) < 0)
3691 "Failed to open codec in %s\n",__FUNCTION__);
3698 #if FF_API_R_FRAME_RATE 3708 int analyzed_all_streams;
3717 int fps_analyze_framecount = 20;
3727 fps_analyze_framecount *= 2;
3729 fps_analyze_framecount = 0;
3733 fps_analyze_framecount = 0;
3740 if (count < fps_analyze_framecount)
3759 analyzed_all_streams = 0;
3760 if (!missing_streams || !*missing_streams)
3762 analyzed_all_streams = 1;
3774 if (read_size >= probesize) {
3777 "Probe buffer size limit of %"PRId64
" bytes reached\n", probesize);
3784 "Stream #%d: not enough frames to estimate rate; " 3785 "consider increasing probesize\n", i);
3806 goto unref_then_goto_end;
3815 read_size += pkt->
size;
3821 goto unref_then_goto_end;
3830 "Non-increasing DTS in stream %d: packet %d with DTS " 3831 "%"PRId64
", packet %d with DTS %"PRId64
"\n",
3847 "DTS discontinuity in stream %d: packet %d with DTS " 3848 "%"PRId64
", packet %d with DTS %"PRId64
"\n",
3881 if (analyzed_all_streams) limit = max_analyze_duration;
3883 else limit = max_stream_analyze_duration;
3886 av_log(ic,
AV_LOG_VERBOSE,
"max_analyze_duration %"PRId64
" reached at %"PRId64
" microseconds st:%d\n",
3902 #if FF_API_R_FRAME_RATE 3911 goto unref_then_goto_end;
3924 (options && i < orig_nb_streams) ? &options[i] :
NULL);
3935 for (stream_index = 0; stream_index < ic->
nb_streams; stream_index++) {
3936 st = ic->
streams[stream_index];
3940 if (codec && !avctx->
codec) {
3944 if (
avcodec_open2(avctx, codec, (options && stream_index < orig_nb_streams) ? &options[stream_index] : &opts) < 0)
3946 "Failed to open codec in %s\n",__FUNCTION__);
3972 (options && i < orig_nb_streams)
3973 ? &options[i] :
NULL);
3978 "decoding for stream %d failed\n", st->
index);
4001 double best_error = 0.01;
4019 if (error < best_error) {
4021 best_fps = std_fps.
num;
4027 if (error < best_error) {
4029 best_fps = std_fps.
num;
4035 best_fps, 12 * 1001, INT_MAX);
4097 goto find_stream_info_err;
4103 "Could not find codec parameters for stream %d (%s): %s\n" 4104 "Consider increasing the value for the 'analyzeduration' (%"PRId64
") and 'probesize' (%"PRId64
") options\n",
4113 goto find_stream_info_err;
4122 goto find_stream_info_err;
4125 goto find_stream_info_err;
4128 #if FF_API_LAVF_AVCTX 4132 goto find_stream_info_err;
4142 if (st->codec->codec_tag !=
MKTAG(
't',
'm',
'c',
'd')) {
4150 if (!st->codec->subtitle_header)
4151 goto find_stream_info_err;
4154 st->codec->subtitle_header_size);
4167 find_stream_info_err:
4178 av_log(ic,
AV_LOG_DEBUG,
"After avformat_find_stream_info() pos: %"PRId64
" bytes read:%"PRId64
" seeks:%d frames:%d\n",
4182 unref_then_goto_end:
4184 goto find_stream_info_err;
4205 int wanted_stream_nb,
int related_stream,
4206 AVCodec **decoder_ret,
int flags)
4210 int best_count = -1, best_multiframe = -1, best_disposition = -1;
4211 int count, multiframe, disposition;
4212 int64_t best_bitrate = -1;
4217 if (related_stream >= 0 && wanted_stream_nb < 0) {
4225 int real_stream_index = program ? program[
i] :
i;
4230 if (wanted_stream_nb >= 0 && real_stream_index != wanted_stream_nb)
4246 multiframe =
FFMIN(5, count);
4247 if ((best_disposition > disposition) ||
4248 (best_disposition == disposition && best_multiframe > multiframe) ||
4249 (best_disposition == disposition && best_multiframe == multiframe && best_bitrate > bitrate) ||
4250 (best_disposition == disposition && best_multiframe == multiframe && best_bitrate == bitrate && best_count >= count))
4252 best_disposition = disposition;
4255 best_multiframe = multiframe;
4256 ret = real_stream_index;
4258 if (program && i == nb_streams - 1 && ret < 0) {
4266 *decoder_ret = (
AVCodec*)best_decoder;
4336 #if FF_API_LAVF_FFSERVER 4338 av_freep(&dst->recommended_encoder_configuration);
4339 if (src->recommended_encoder_configuration) {
4340 const char *conf_str = src->recommended_encoder_configuration;
4341 dst->recommended_encoder_configuration =
av_strdup(conf_str);
4342 if (!dst->recommended_encoder_configuration)
4387 #if FF_API_LAVF_AVCTX 4393 #if FF_API_LAVF_FFSERVER 4395 av_freep(&st->recommended_encoder_configuration);