You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avf: move ff_write_chained to mux.c
This commit is contained in:
@@ -621,3 +621,21 @@ fail:
|
|||||||
av_freep(&s->priv_data);
|
av_freep(&s->priv_data);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
|
||||||
|
AVFormatContext *src)
|
||||||
|
{
|
||||||
|
AVPacket local_pkt;
|
||||||
|
|
||||||
|
local_pkt = *pkt;
|
||||||
|
local_pkt.stream_index = dst_stream;
|
||||||
|
if (pkt->pts != AV_NOPTS_VALUE)
|
||||||
|
local_pkt.pts = av_rescale_q(pkt->pts,
|
||||||
|
src->streams[pkt->stream_index]->time_base,
|
||||||
|
dst->streams[dst_stream]->time_base);
|
||||||
|
if (pkt->dts != AV_NOPTS_VALUE)
|
||||||
|
local_pkt.dts = av_rescale_q(pkt->dts,
|
||||||
|
src->streams[pkt->stream_index]->time_base,
|
||||||
|
dst->streams[dst_stream]->time_base);
|
||||||
|
return av_write_frame(dst, &local_pkt);
|
||||||
|
}
|
||||||
|
@@ -3153,24 +3153,6 @@ int ff_url_join(char *str, int size, const char *proto,
|
|||||||
return strlen(str);
|
return strlen(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_write_chained(AVFormatContext *dst, int dst_stream, AVPacket *pkt,
|
|
||||||
AVFormatContext *src)
|
|
||||||
{
|
|
||||||
AVPacket local_pkt;
|
|
||||||
|
|
||||||
local_pkt = *pkt;
|
|
||||||
local_pkt.stream_index = dst_stream;
|
|
||||||
if (pkt->pts != AV_NOPTS_VALUE)
|
|
||||||
local_pkt.pts = av_rescale_q(pkt->pts,
|
|
||||||
src->streams[pkt->stream_index]->time_base,
|
|
||||||
dst->streams[dst_stream]->time_base);
|
|
||||||
if (pkt->dts != AV_NOPTS_VALUE)
|
|
||||||
local_pkt.dts = av_rescale_q(pkt->dts,
|
|
||||||
src->streams[pkt->stream_index]->time_base,
|
|
||||||
dst->streams[dst_stream]->time_base);
|
|
||||||
return av_write_frame(dst, &local_pkt);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
|
void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
|
||||||
void *context)
|
void *context)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user