On 22.06.2015 10:09, Carl Eugen Hoyos wrote:
Hi!
On Mon, 22 Jun 2015, Peter Belkner wrote:
if (0!=*got_packet) {
av_packet_rescale_ts(pkt,cc->time_base,st->time_base);
+ // where do the "magic" factor 0.5 come from?
+ pkt->dts>>=1;
+ pkt->pts>>=1;
+ pkt->duration>>=1;
if (ffsox_stream_interleaved_write(so,pkt)<0) {
DMESSAGE("writing packet");
Maybe Carl Eugen can provide some insight into how to align the time
scales between streams.
Your patch looks very wrong to me
Obviously it is not wrong because it does the right thing :-) The
question is why, because, of course, this patch is ad hoc without any
understanding.
but I only commented on a ffmpeg command line that you claimed shows a
problem with FFmpeg (it only showed an issue
with the command line in question).
I don't know what libffsox is.
It's a utility library where this code comes from.
int ffsox_stream_interleaved_write(stream_t *s, AVPacket *pkt)
{
pkt->stream_index=s->stream_index;
#if 0 // {
fprintf(stderr,"%d: %I64d, %I64d\n",pkt->stream_index,pkt->pts,pkt->dts);
#endif // }
return av_interleaved_write_frame(s->fc,pkt);
}
One thing that comes to mind is: Is st->time_base the time_base of the
input or the output stream? They do not have to be identical, not even
if you requested them to be identical.
Stream "st" and codec context "cc" are output.
The packet "pkt" is constructed from a fresh frame which has no direct
link to the decoded frame from the input, except sample frequency,
number of channels, and channel layout.
Carl Eugen
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers