diff options
-rw-r--r-- | src/decoder/ffmpeg_decoder_plugin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/decoder/ffmpeg_decoder_plugin.c b/src/decoder/ffmpeg_decoder_plugin.c index 369e8d426..678bba6fa 100644 --- a/src/decoder/ffmpeg_decoder_plugin.c +++ b/src/decoder/ffmpeg_decoder_plugin.c @@ -181,6 +181,11 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is, uint8_t *packet_data; int packet_size; + if (packet->pts != (int64_t)AV_NOPTS_VALUE) + decoder_timestamp(decoder, + av_rescale_q(packet->pts, *time_base, + (AVRational){1, 1})); + packet_data = packet->data; packet_size = packet->size; @@ -205,11 +210,6 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is, if (audio_size <= 0) continue; - if (packet->pts != (int64_t)AV_NOPTS_VALUE) - decoder_timestamp(decoder, - av_rescale_q(packet->pts, *time_base, - (AVRational){1, 1})); - cmd = decoder_data(decoder, is, aligned_buffer, audio_size, codec_context->bit_rate / 1000); |