History

avformat/utils: Move av_read_(play|pause) to demux_utils.c

These functions are for demuxers only.

Andreas Rheinhardt committed 4 years ago

Commit 0b0dfb71 parent f1043522 files · +18 −18Browse files

Showing the changes to libavformat (2 of 2 files). Show all

Unified · Split

2 files
  1. libavformat/demux_utils.c +18 −0
  2. libavformat/utils.c +0 −18
libavformat/demux_utils.c+18−0
@@ -197,3 +197,21 @@ FF_ENABLE_DEPRECATION_WARNINGS · 196 unmodified lines
197197 }
198198 return 0;
199199 }
200+
201+int av_read_play(AVFormatContext *s)
202+{
203+ if (s->iformat->read_play)
204+ return s->iformat->read_play(s);
205+ if (s->pb)
206+ return avio_pause(s->pb, 0);
207+ return AVERROR(ENOSYS);
208+}
209+
210+int av_read_pause(AVFormatContext *s)
211+{
212+ if (s->iformat->read_pause)
213+ return s->iformat->read_pause(s);
214+ if (s->pb)
215+ return avio_pause(s->pb, 1);
216+ return AVERROR(ENOSYS);
217+}
libavformat/utils.c+0−18
@@ -458,24 +458,6 @@ int av_find_best_stream(AVFormatContext *ic, enum AVMediaType type, · 457 unmodified lines
458458
459459 /*******************************************************/
460460
461−int av_read_play(AVFormatContext *s)
462−{
463− if (s->iformat->read_play)
464− return s->iformat->read_play(s);
465− if (s->pb)
466− return avio_pause(s->pb, 0);
467− return AVERROR(ENOSYS);
468−}
469−
470−int av_read_pause(AVFormatContext *s)
471−{
472− if (s->iformat->read_pause)
473− return s->iformat->read_pause(s);
474− if (s->pb)
475− return avio_pause(s->pb, 1);
476− return AVERROR(ENOSYS);
477−}
478−
479461 int ff_stream_side_data_copy(AVStream *dst, const AVStream *src)
480462 {
481463 /* Free existing side data*/

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t