* [FFmpeg-devel] [PATCH] avformat/movenc: fix safari cannot play generated hls due to empty sdtp atom
@ 2023-11-18 10:26 Jay Zhang
2023-11-29 0:19 ` Jie Zhang
0 siblings, 1 reply; 2+ messages in thread
From: Jay Zhang @ 2023-11-18 10:26 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Jay Zhang
This issue can be reproduced by command 'ffmpeg -i small_bunny_1080p_60fps.mp4 -an -c:v libx265 -tag:v hvc1 -f hls -hls_segment_type fmp4 out.m3u8'. After remove the empty sdtp atom, safari can play the out.m3u8 properly.
Signed-off-by: Jay Zhang <wangyoucao577@gmail.com>
---
libavformat/movenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index e39f1ac987..34ac7e9dcc 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2827,7 +2827,7 @@ static int mov_write_stbl_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContext
track->par->codec_tag == MKTAG('r','t','p',' ')) &&
track->has_keyframes && track->has_keyframes < track->entry)
mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE);
- if (track->par->codec_type == AVMEDIA_TYPE_VIDEO && track->has_disposable)
+ if (track->par->codec_type == AVMEDIA_TYPE_VIDEO && track->has_disposable && track->entry)
mov_write_sdtp_tag(pb, track);
if (track->mode == MODE_MOV && track->flags & MOV_TRACK_STPS)
mov_write_stss_tag(pb, track, MOV_PARTIAL_SYNC_SAMPLE);
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avformat/movenc: fix safari cannot play generated hls due to empty sdtp atom
2023-11-18 10:26 [FFmpeg-devel] [PATCH] avformat/movenc: fix safari cannot play generated hls due to empty sdtp atom Jay Zhang
@ 2023-11-29 0:19 ` Jie Zhang
0 siblings, 0 replies; 2+ messages in thread
From: Jie Zhang @ 2023-11-29 0:19 UTC (permalink / raw)
To: ffmpeg-devel
Hello,
Is there any one can help to review this? Thanks!
On Sat, Nov 18, 2023 at 6:26 PM Jay Zhang <wangyoucao577@gmail.com> wrote:
> This issue can be reproduced by command 'ffmpeg -i
> small_bunny_1080p_60fps.mp4 -an -c:v libx265 -tag:v hvc1 -f hls
> -hls_segment_type fmp4 out.m3u8'. After remove the empty sdtp atom, safari
> can play the out.m3u8 properly.
>
> Signed-off-by: Jay Zhang <wangyoucao577@gmail.com>
> ---
> libavformat/movenc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> index e39f1ac987..34ac7e9dcc 100644
> --- a/libavformat/movenc.c
> +++ b/libavformat/movenc.c
> @@ -2827,7 +2827,7 @@ static int mov_write_stbl_tag(AVFormatContext *s,
> AVIOContext *pb, MOVMuxContext
> track->par->codec_tag == MKTAG('r','t','p',' ')) &&
> track->has_keyframes && track->has_keyframes < track->entry)
> mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE);
> - if (track->par->codec_type == AVMEDIA_TYPE_VIDEO &&
> track->has_disposable)
> + if (track->par->codec_type == AVMEDIA_TYPE_VIDEO &&
> track->has_disposable && track->entry)
> mov_write_sdtp_tag(pb, track);
> if (track->mode == MODE_MOV && track->flags & MOV_TRACK_STPS)
> mov_write_stss_tag(pb, track, MOV_PARTIAL_SYNC_SAMPLE);
> --
> 2.34.1
>
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-29 0:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-18 10:26 [FFmpeg-devel] [PATCH] avformat/movenc: fix safari cannot play generated hls due to empty sdtp atom Jay Zhang
2023-11-29 0:19 ` Jie Zhang
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git