[FFmpeg-devel] [PATCH] libavformat/aea EOF Patch

Marton Balint cus at passwd.hu
Thu Mar 9 22:16:41 EET 2023



On Thu, 9 Mar 2023, asivery wrote:

> Thank you very much, indeed that works as well.
> Here's the updated patch.

Will apply, thanks.

Marton

>
> Best regards.
>
> ---
> diff --git a/libavformat/aea.c b/libavformat/aea.c
> index f4b39e4f9e..d16217381b 100644
> --- a/libavformat/aea.c
> +++ b/libavformat/aea.c
> @@ -90,13 +90,7 @@ static int aea_read_header(AVFormatContext *s)
>
> static int aea_read_packet(AVFormatContext *s, AVPacket *pkt)
> {
> -    int ret = av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);
> -
> -    pkt->stream_index = 0;
> -    if (ret <= 0)
> -        return AVERROR(EIO);
> -
> -    return ret;
> +    return av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);
> }
>
> const AVInputFormat ff_aea_demuxer = {
>
> ------- Original Message -------
> On Thursday, March 9th, 2023 at 12:28 AM, Marton Balint <cus at passwd.hu> wrote:
>
>
>>
>> On Sat, 4 Mar 2023, asivery wrote:
>>
>>> Could someone please take a look? This would improve AEA demuxing, right now every AEA file makes ffmpeg crash with an error.
>>
>>
>> The way I see it, you could simply replace the whole body of
>> aea_read_packet() with this single line:
>>
>> return av_get_packet(s->pb, pkt, s->streams[0]->codecpar->block_align);
>>
>>
>> Regards,
>> Marton
>>
>>> Thank you in advance :)
>>> ------- Original Message -------
>>> On Saturday, October 22nd, 2022 at 7:43 PM, asivery asivery at protonmail.com wrote:
>>>
>>>> Hello,
>>>> This patch aims to fix a problem I've noticed while working with AEA (Sony ATRAC1 comtainer) files.
>>>> Right now FFmpeg always exits with an "Input/Output error" when dealing with AEA files.
>>>> This patch solves that issue by returning AVERROR_EOF once the end of file is encountered, instead of always returning AVERROR(EIO).
>>>>
>>>> I am sending this patch again because of an incorrect mime type of the first one.
>>>>
>>>> Best regards,Asivery
>>>> _______________________________________________
>>>> ffmpeg-devel mailing list
>>>> ffmpeg-devel at ffmpeg.org
>>>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>>
>>> To unsubscribe, visit link above, or email
>>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-devel mailing list