On Tue, Nov 22, 2011 at 07:19:55AM +0100, Anton Khirnov wrote:
> Also simplify the code so it's the same for video/audio/subs.
> ---
> avconv.c | 10 ++++------
> 1 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/avconv.c b/avconv.c
> index 3ba8534..b30dad4 100644
> --- a/avconv.c
> +++ b/avconv.c
> @@ -1738,6 +1738,8 @@ static int transcode_video(InputStream *ist, AVPacket
> *pkt, int *got_output, int
> decoded_frame, got_output, pkt);
> if (ret < 0)
> goto fail;
> + pkt->data += ret;
> + pkt->size -= ret;
I think it was assumed that there's only a single frame per packet for
video streams. This doesn't harm if it's still the case and it makes
sense to assume the same behaviour for all decode functions.
> quality = same_quant ? decoded_frame->quality : 0;
> if (!*got_output) {
> @@ -1818,11 +1820,10 @@ static int transcode_subtitles(InputStream *ist,
> AVPacket *pkt, int *got_output)
> &subtitle, got_output, pkt);
> if (ret < 0)
> return ret;
> + pkt->size = 0;
> if (!*got_output)
> return 0;
>
> - pkt->size = 0;
> -
Is there a reason why the same shouldn't hold for subtitle streams?
Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel